- Jul 02, 2014
-
-
Chandler Carruth authored
operation legalization code. llvm-svn: 212155
-
Alp Toker authored
This source range is useful for all kinds of diagnostic QOI and refactoring work, so let's make it more discoverable. This commit also makes use of the new function to enhance various diagnostics relating to return types and resolves an old FIXME. llvm-svn: 212154
-
Eric Christopher authored
a separate function and clean up calling convention for helper function. llvm-svn: 212153
-
Eric Christopher authored
llvm-svn: 212152
-
Eric Christopher authored
llvm-svn: 212151
-
Eric Christopher authored
llvm-svn: 212150
-
Eric Christopher authored
llvm-svn: 212149
-
Reid Kleckner authored
Clang-cl supports MSVC-style RTTI now, and we can even compile typeid(...) with /GR-. Just don't instantiate std::function with a polymorphic type, or bad things will happen. llvm-svn: 212148
-
Eric Christopher authored
down to the subtarget. llvm-svn: 212147
-
Eric Christopher authored
that information. llvm-svn: 212146
-
Todd Fiala authored
See http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-20140630/011508.html for more details. Change by Matthew Gardiner. llvm-svn: 212145
-
NAKAMURA Takumi authored
llvm-svn: 212144
-
Kevin Enderby authored
llvm-svn: 212143
-
David Majnemer authored
No functionality change, just some comments to describe what is going on. llvm-svn: 212142
-
Kevin Enderby authored
llvm-svn: 212141
-
Juergen Ributzka authored
llvm-svn: 212140
-
David Majnemer authored
This test was supposed to go in with r212125. llvm-svn: 212139
-
David Majnemer authored
There are slight differences between /GR- and -fno-rtti which made mapping one to the other inappropriate. -fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related information for the v-table. /GR- does not generate complete object locators and thus will not reference them in vftables. However, constructs like dynamic_cast and typeid are permitted. This should bring our implementation of RTTI up to semantic parity with MSVC modulo bugs. llvm-svn: 212138
-
Reid Kleckner authored
LLVM r211399 started emitting .pdata for win64 by default. Unfortunately, it produces invalid object files. I plan to fix that Soon. For now, don't request unwind tables. This fixes the clang-cl self-host on win64. llvm-svn: 212137
-
Tim Northover authored
Otherwise they get freed and the implicit "isa<XYZ>" tests following turn out badly (at least under sanitizers). Also corrects the ordering of unordered atomic stores. llvm-svn: 212136
-
Juergen Ributzka authored
The argument list vector is never used after it has been passed to the CallLoweringInfo and moving it to the CallLoweringInfo is cleaner and pretty much as cheap as keeping a pointer to it. llvm-svn: 212135
-
Tim Northover authored
On targets without cmpxchg16b or cmpxchg8b, the borderline atomic operations were slipping through the gaps. X86AtomicExpand.cpp was delegating to ISelLowering. Generic ISelLowering was delegating to X86ISelLowering and X86ISelLowering was asserting. The correct behaviour is to expand to a libcall, preferably in generic ISelLowering. This can be achieved by X86ISelLowering deciding it doesn't want the faff after all. llvm-svn: 212134
-
Reid Kleckner authored
This patch reduces the stack memory consumption of the InstCombine function "isOnlyCopiedFromConstantGlobal() ", that in certain conditions could overflow the stack because of excessive recursiveness. For example, in a case like this: %0 = alloca [50025 x i32], align 4 %1 = getelementptr inbounds [50025 x i32]* %0, i64 0, i64 0 store i32 0, i32* %1 %2 = getelementptr inbounds i32* %1, i64 1 store i32 1, i32* %2 %3 = getelementptr inbounds i32* %2, i64 1 store i32 2, i32* %3 %4 = getelementptr inbounds i32* %3, i64 1 store i32 3, i32* %4 %5 = getelementptr inbounds i32* %4, i64 1 store i32 4, i32* %5 %6 = getelementptr inbounds i32* %5, i64 1 store i32 5, i32* %6 ... This piece of code crashes llvm when trying to apply instcombine on desktop. On embedded devices this could happen with a much lower limit of recursiveness. Some instructions (getelementptr and bitcasts) make the function recursively call itself on their uses, which is what makes the example above consume so much stack (it becomes a recursive depth-first tree visit with a very big depth). The patch changes the algorithm to be semantically equivalent, but iterative instead of recursive and the visiting order to be from a depth-first visit to a breadth-first visit (visit all the instructions of the current level before the ones of the next one). Now if a lot of memory is required a heap allocation is done instead of the the stack allocation, avoiding the possible crash. Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D4355 Patch by Marcello Maggioni! We don't generally commit large stress test that look for out of memory conditions, so I didn't request that one be added to the patch. llvm-svn: 212133
-
Bruce Mitchener authored
llvm-svn: 212132
-
Bruce Mitchener authored
llvm-svn: 212131
-
Alp Toker authored
This macro is sometimes defined manually but isn't (and doesn't need to be) in llvm-config.h so shouldn't appear in the headers, likewise NDEBUG. Instead switch them over to LLVM_DUMP_METHOD on the definitions. llvm-svn: 212130
-
Bruce Mitchener authored
llvm-svn: 212129
-
David Blaikie authored
Matching behavior with DeadArgumentElimination (and leveraging some now-common infrastructure), keep track of the function from debug info metadata if arguments are promoted. This may produce interesting debug info - since the arguments may be missing or of different types... but at least backtraces, inlining, etc, will be correct. llvm-svn: 212128
-
David Majnemer authored
Stash whether or not we have an RTTI component away instead of recomputing it. llvm-svn: 212127
-
Johannes Doerfert authored
This change is particularly useful in the code generation as we need to know which binary operator/identity element we need to combine/initialize the privatization locations. + Print the reduction type for each memory access + Adjusted the test cases to comply with the new output format and to test for the right reduction type llvm-svn: 212126 -
David Majnemer authored
The pointer for a class's RTTI data comes right before the VFTable but has no name. To be properly compatible with this, we do the following: * Create a single GlobalVariable which holds the contents of the VFTable _and_ the pointer to the RTTI data. * Create a GlobalAlias, with appropriate linkage/visibility, that points just after the RTTI data pointer. This ensures that the VFTable symbol will always refer to VFTable data. * Create a Comdat with a "Largest" SelectionKind and stick the private GlobalVariable in it. By transitivity, the GlobalAlias will be a member of the Comdat group. Using "Largest" ensures that foreign definitions without an RTTI data pointer will _not_ be chosen in the final linked image. Whether or not we emit RTTI data depends on several things: * The -fno-rtti flag implies that we should never not emit a pointer to RTTI data before the VFTable. * __declspec(dllimport) brings in the VFTable from a remote DLL. Use an available_externally GlobalVariable to provide a local definition of the VFTable. This means that we won't have any available_externally definitions of things like complete object locators. This is acceptable because they are never directly referenced. To my knowledge, this completes the implementation of MSVC RTTI code generation. Further semantic work should be done to properly support /GR-. llvm-svn: 212125
-
Eric Christopher authored
down to the subtarget. Add an initialization routine to assist. llvm-svn: 212124
-
Eric Christopher authored
from SystemZFrameLowering. llvm-svn: 212123
-
David Blaikie authored
Update DeadArgumentElimintation to use this, with the intent of reusing the functionality for ArgumentPromotion as well. llvm-svn: 212122
-
Alexey Samsonov authored
unit test source file is compiled with Clang. llvm-svn: 212121
-
Tim Northover authored
llvm-svn: 212120
-
Tim Northover authored
The logic for expanding atomics that aren't natively supported in terms of cmpxchg loops is much simpler to express at the IR level. It also allows the normal optimisations and CodeGen improvements to help out with atomics, instead of using a limited set of possible instructions.. rdar://problem/13496295 llvm-svn: 212119
-
Reid Kleckner authored
These flags enable behavior in MSVC that Clang has by default. /Zc:inline essentially marks all COMDATs as discardable. In LLVM parlance, this means using linkonce_odr linkage, which is what we already do. llvm-svn: 212117
-
Sean Silva authored
Fixes PR20169 llvm-svn: 212116
-
Sean Silva authored
Fixes PR20167 llvm-svn: 212115
-