Revision tags: llvmorg-3.6.0 |
|
#
e95c5b32 |
| 24-Feb-2015 |
Tim Northover <tnorthover@apple.com> |
ARM: treat [N x i32] and [N x i64] as AAPCS composite types
The logic is almost there already, with our special homogeneous aggregate handling. Tweaking it like this allows front-ends to emit AAPCS
ARM: treat [N x i32] and [N x i64] as AAPCS composite types
The logic is almost there already, with our special homogeneous aggregate handling. Tweaking it like this allows front-ends to emit AAPCS compliant code without ever having to count registers or add discarded padding arguments.
Only arrays of i32 and i64 are needed to model AAPCS rules, but I decided to apply the logic to all integer arrays for more consistency.
llvm-svn: 230348
show more ...
|
#
d5ab35f2 |
| 21-Feb-2015 |
David Majnemer <david.majnemer@gmail.com> |
X86: Call __main using the SelectionDAG
Synthesizing a call directly using the MI layer would confuse the frame lowering code. This is problematic as frame lowering is highly sensitive the particul
X86: Call __main using the SelectionDAG
Synthesizing a call directly using the MI layer would confuse the frame lowering code. This is problematic as frame lowering is highly sensitive the particularities of calls, etc.
llvm-svn: 230129
show more ...
|
Revision tags: llvmorg-3.6.0-rc4 |
|
#
6cd780ff |
| 17-Feb-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
Prefer SmallVector::append/insert over push_back loops.
Same functionality, but hoists the vector growth out of the loop.
llvm-svn: 229500
|
#
05938a54 |
| 16-Feb-2015 |
Andrew Trick <atrick@apple.com> |
AArch64: Safely handle the incoming sret call argument.
This adds a safe interface to the machine independent InputArg struct for accessing the index of the original (IR-level) argument. When a non-
AArch64: Safely handle the incoming sret call argument.
This adds a safe interface to the machine independent InputArg struct for accessing the index of the original (IR-level) argument. When a non-native return type is lowered, we generate the hidden machine-level sret argument on-the-fly. Before this fix, we were representing this argument as OrigArgIndex == 0, which is an outright lie. In particular this crashed in the AArch64 backend where we actually try to access the type of the original argument.
Now we use a sentinel value for machine arguments that have no original argument index. AArch64, ARM, Mips, and PPC now check for this case before accessing the original argument.
Fixes <rdar://19792160> Null pointer assertion in AArch64TargetLowering
llvm-svn: 229413
show more ...
|
#
70eb9c5a |
| 14-Feb-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
CodeGen: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.
getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getF
CodeGen: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API.
getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind)
getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind)
Also, add `Function::getFnStackAlignment()`, and canonicalize:
getAttributes().getStackAlignment(AttributeSet::FunctionIndex) => getFnStackAlignment()
llvm-svn: 229208
show more ...
|
Revision tags: llvmorg-3.6.0-rc3 |
|
#
5f6a9072 |
| 12-Feb-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
MathExtras: Bring Count(Trailing|Leading)Ones and CountPopulation in line with countTrailingZeros
Update all callers.
llvm-svn: 228930
|
#
78b53dbc |
| 10-Feb-2015 |
Andrew Kaylor <andrew.kaylor@intel.com> |
Adding support for llvm.eh.begincatch and llvm.eh.endcatch intrinsics and beginning the documentation of native Windows exception handling.
Differential Revision: http://reviews.llvm.org/D7398
llvm
Adding support for llvm.eh.begincatch and llvm.eh.endcatch intrinsics and beginning the documentation of native Windows exception handling.
Differential Revision: http://reviews.llvm.org/D7398
llvm-svn: 228733
show more ...
|
Revision tags: llvmorg-3.6.0-rc2 |
|
#
8220adda |
| 27-Jan-2015 |
Manuel Jacob <me@manueljacob.de> |
Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.
When lowering memcpy, memset or memmove, this assert checks whether the pointer operands are in an address space < 256
Add a FIXME in SelectionDAGBuilder before an assert that is valid only on X86.
When lowering memcpy, memset or memmove, this assert checks whether the pointer operands are in an address space < 256 which means "user defined address space" on X86. However, this notion of "user defined address space" does not exist for other targets.
llvm-svn: 227191
show more ...
|
#
2b214e7a |
| 27-Jan-2015 |
Eric Christopher <echristo@gmail.com> |
Grab the TargetLowering info from the DAG rather than querying for a subtarget.
llvm-svn: 227156
|
#
8b770651 |
| 26-Jan-2015 |
Eric Christopher <echristo@gmail.com> |
Move DataLayout back to the TargetMachine from TargetSubtargetInfo derived classes.
Since global data alignment, layout, and mangling is often based on the DataLayout, move it to the TargetMachine.
Move DataLayout back to the TargetMachine from TargetSubtargetInfo derived classes.
Since global data alignment, layout, and mangling is often based on the DataLayout, move it to the TargetMachine. This ensures that global data is going to be layed out and mangled consistently if the subtarget changes on a per function basis. Prior to this all targets(*) have had subtarget dependent code moved out and onto the TargetMachine.
*One target hasn't been migrated as part of this change: R600. The R600 port has, as a subtarget feature, the size of pointers and this affects global data layout. I've currently hacked in a FIXME to enable progress, but the port needs to be updated to either pass the 64-bitness to the TargetMachine, or fix the DataLayout to avoid subtarget dependent features.
llvm-svn: 227113
show more ...
|
#
56a03938 |
| 26-Jan-2015 |
Philip Reames <listmail@philipreames.com> |
Revert GCStrategy ownership changes
This change reverts the interesting parts of 226311 (and 227046). This change introduced two problems, and I've been convinced that an alternate approach is pref
Revert GCStrategy ownership changes
This change reverts the interesting parts of 226311 (and 227046). This change introduced two problems, and I've been convinced that an alternate approach is preferrable anyways.
The bugs were: - Registery appears to require all users be within the same linkage unit. After this change, asking for "statepoint-example" in Transform/ would sometimes get you nullptr, whereas asking the same question in CodeGen would return the right GCStrategy. The correct long term fix is to get rid of the utter hack which is Registry, but I don't have time for that right now. 227046 appears to have been an attempt to fix this, but I don't believe it does so completely. - GCMetadataPrinter::finishAssembly was being called more than once per GCStrategy. Each Strategy was being added to the GCModuleInfo multiple times.
Once I get time again, I'm going to split GCModuleInfo into the gc.root specific part and a GCStrategy owning Analysis pass. I'm probably also going to kill off the Registry. Once that's done, I'll move the new GCStrategyAnalysis and all built in GCStrategies into Analysis. (As original suggested by Chandler.) This will accomplish my original goal of being able to access GCStrategy from Transform/ without adding all of the builtin GCs to IR/.
llvm-svn: 227109
show more ...
|
#
75a4f35b |
| 22-Jan-2015 |
Ramkumar Ramachandra <artagnon@gmail.com> |
Intrinsics: introduce llvm_any_ty aka ValueType Any
Specifically, gc.result benefits from this greatly. Instead of:
gc.result.int.* gc.result.float.* gc.result.ptr.* ...
We now have a gc.result.*
Intrinsics: introduce llvm_any_ty aka ValueType Any
Specifically, gc.result benefits from this greatly. Instead of:
gc.result.int.* gc.result.float.* gc.result.ptr.* ...
We now have a gc.result.* that can specialize to literally any type.
Differential Revision: http://reviews.llvm.org/D7020
llvm-svn: 226857
show more ...
|
#
150d9f31 |
| 22-Jan-2015 |
Elena Demikhovsky <elena.demikhovsky@intel.com> |
Fixed a bug in type legalizer for masked load/store intrinsics. The problem occurs when after vectorization we have type <2 x i32>. This type is promoted to <2 x i64> and then requires additional eff
Fixed a bug in type legalizer for masked load/store intrinsics. The problem occurs when after vectorization we have type <2 x i32>. This type is promoted to <2 x i64> and then requires additional efforts for expanding loads and truncating stores. I added EXPAND / TRUNCATE attributes to the masked load/store SDNodes. The code now contains additional shuffles. I've prepared changes in the cost estimation for masked memory operations, it will be submitted separately.
llvm-svn: 226808
show more ...
|
#
6b77455f |
| 20-Jan-2015 |
Daniel Jasper <djasper@google.com> |
Prevent binary-tree deterioration in sparse switch statements.
This addresses part of llvm.org/PR22262. Specifically, it prevents considering the densities of sub-ranges that have fewer than TLI.get
Prevent binary-tree deterioration in sparse switch statements.
This addresses part of llvm.org/PR22262. Specifically, it prevents considering the densities of sub-ranges that have fewer than TLI.getMinimumJumpTableEntries() elements. Those densities won't help jump tables.
This is not a complete solution but works around the most pressing issue.
Review: http://reviews.llvm.org/D7070 llvm-svn: 226600
show more ...
|
#
d106b734 |
| 20-Jan-2015 |
Daniel Jasper <djasper@google.com> |
Factor out a splitSwitchCase() function so that it can be reused.
This is in preparation for a fix to llvm.org/PR22262. One of the ideas here is to first find a good jump table range first and then
Factor out a splitSwitchCase() function so that it can be reused.
This is in preparation for a fix to llvm.org/PR22262. One of the ideas here is to first find a good jump table range first and then split before and after it. Thereby, we don't need to use the split-based-on-density heuristic at all, which can make the "binary tree" deteriorate in various cases.
Also some minor cleanups.
No functional changes.
llvm-svn: 226551
show more ...
|
#
2b453958 |
| 16-Jan-2015 |
Philip Reames <listmail@philipreames.com> |
Move ownership of GCStrategy objects to LLVMContext
Note: This change ended up being slightly more controversial than expected. Chandler has tentatively okayed this for the moment, but I may be rev
Move ownership of GCStrategy objects to LLVMContext
Note: This change ended up being slightly more controversial than expected. Chandler has tentatively okayed this for the moment, but I may be revisiting this in the near future after we settle some high level questions.
Rather than have the GCStrategy object owned by the GCModuleInfo - which is an immutable analysis pass used mainly by gc.root - have it be owned by the LLVMContext. This simplifies the ownership logic (i.e. can you have two instances of the same strategy at once?), but more importantly, allows us to access the GCStrategy in the middle end optimizer. To this end, I add an accessor through Function which becomes the canonical way to get at a GCStrategy instance.
In the near future, this will allows me to move some of the checks from http://reviews.llvm.org/D6808 into the Verifier itself, and to introduce optimization legality predicates for some of the recent additions to InstCombine. (These will follow as separate changes.)
Differential Revision: http://reviews.llvm.org/D6811
llvm-svn: 226311
show more ...
|
Revision tags: llvmorg-3.6.0-rc1 |
|
#
62d4215b |
| 15-Jan-2015 |
Chandler Carruth <chandlerc@gmail.com> |
[PM] Move TargetLibraryInfo into the Analysis library.
While the term "Target" is in the name, it doesn't really have to do with the LLVM Target library -- this isn't an abstraction which LLVM targe
[PM] Move TargetLibraryInfo into the Analysis library.
While the term "Target" is in the name, it doesn't really have to do with the LLVM Target library -- this isn't an abstraction which LLVM targets generally need to implement or extend. It has much more to do with modeling the various runtime libraries on different OSes and with different runtime environments. The "target" in this sense is the more general sense of a target of cross compilation.
This is in preparation for porting this analysis to the new pass manager.
No functionality changed, and updates inbound for Clang and Polly.
llvm-svn: 226078
show more ...
|
#
0a57f655 |
| 14-Jan-2015 |
Reid Kleckner <reid@kleckner.net> |
CodeGen support for x86_64 SEH catch handlers in LLVM
This adds handling for ExceptionHandling::MSVC, used by the x86_64-pc-windows-msvc triple. It assumes that filter functions have already been ou
CodeGen support for x86_64 SEH catch handlers in LLVM
This adds handling for ExceptionHandling::MSVC, used by the x86_64-pc-windows-msvc triple. It assumes that filter functions have already been outlined in either the frontend or the backend. Filter functions are used in place of the landingpad catch clause type info operands. In catch clause order, the first filter to return true will catch the exception.
The C specific handler table expects the landing pad to be split into one block per handler, but LLVM IR uses a single landing pad for all possible unwind actions. This patch papers over the mismatch by synthesizing single instruction BBs for every catch clause to fill in the EH selector that the landing pad block expects.
Missing functionality: - Accessing data in the parent frame from outlined filters - Cleanups (from __finally) are unsupported, as they will require outlining and parent frame access - Filter clauses are unsupported, as there's no clear analogue in SEH
In other words, this is the minimal set of changes needed to write IR to catch arbitrary exceptions and resume normal execution.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D6300
llvm-svn: 225904
show more ...
|
#
0ad96c81 |
| 13-Jan-2015 |
Hal Finkel <hfinkel@anl.gov> |
[StackMaps] Mark in CallLoweringInfo when lowering a patchpoint
While, generally speaking, the process of lowering arguments for a patchpoint is the same as lowering a regular indirect call, on some
[StackMaps] Mark in CallLoweringInfo when lowering a patchpoint
While, generally speaking, the process of lowering arguments for a patchpoint is the same as lowering a regular indirect call, on some targets it may not be exactly the same. Targets may not, for example, want to add additional register dependencies that apply only to making cross-DSO calls through linker stubs, may not want to load additional registers out of function descriptors, and may not want to add additional side-effect-causing instructions that cannot be removed later with the call itself being generated.
The PowerPC target will use this in a future commit (for all of the reasons stated above).
llvm-svn: 225806
show more ...
|
#
3542ace6 |
| 13-Jan-2015 |
Reid Kleckner <reid@kleckner.net> |
Rename llvm.recoverframeallocation to llvm.framerecover
This name is less descriptive, but it sort of puts things in the 'llvm.frame...' namespace, relating it to frameallocate and frameaddress. It
Rename llvm.recoverframeallocation to llvm.framerecover
This name is less descriptive, but it sort of puts things in the 'llvm.frame...' namespace, relating it to frameallocate and frameaddress. It also avoids using "allocate" and "allocation" together.
llvm-svn: 225752
show more ...
|
#
e9b89318 |
| 13-Jan-2015 |
Reid Kleckner <reid@kleckner.net> |
Add the llvm.frameallocate and llvm.recoverframeallocation intrinsics
These intrinsics allow multiple functions to share a single stack allocation from one function's call frame. The function with t
Add the llvm.frameallocate and llvm.recoverframeallocation intrinsics
These intrinsics allow multiple functions to share a single stack allocation from one function's call frame. The function with the allocation may only perform one allocation, and it must be in the entry block.
Functions accessing the allocation call llvm.recoverframeallocation with the function whose frame they are accessing and a frame pointer from an active call frame of that function.
These intrinsics are very difficult to inline correctly, so the intention is that they be introduced rarely, or at least very late during EH preparation.
Reviewers: echristo, andrew.w.kaylor
Differential Revision: http://reviews.llvm.org/D6493
llvm-svn: 225746
show more ...
|
#
f3721bf6 |
| 06-Jan-2015 |
Mehdi Amini <mehdi.amini@apple.com> |
SelectionDAGBuilder: move constant initialization out of loop
No semantic change intended.
Reviewers: resistor
Differential Revision: http://reviews.llvm.org/D6834
llvm-svn: 225278
|
#
fb81b93e |
| 25-Dec-2014 |
Elena Demikhovsky <elena.demikhovsky@intel.com> |
Masked Load/Store - Changed the order of parameters in intrinsics. No functional changes. The documentation is coming.
llvm-svn: 224829
|
Revision tags: llvmorg-3.5.1, llvmorg-3.5.1-rc2 |
|
#
224cb82a |
| 16-Dec-2014 |
Hans Wennborg <hans@hanshq.net> |
SelectionDAG switch lowering: use 'unsigned' to count destination popularity
SwitchInst::getNumCases() returns unsinged, so using uint64_t to count cases seems unnecessary.
Also fix a missing CHECK
SelectionDAG switch lowering: use 'unsigned' to count destination popularity
SwitchInst::getNumCases() returns unsinged, so using uint64_t to count cases seems unnecessary.
Also fix a missing CHECK in the test case.
llvm-svn: 224393
show more ...
|
#
addddc44 |
| 15-Dec-2014 |
Michael Ilseman <milseman@apple.com> |
Silence more static analyzer warnings.
Add in definedness checks for shift operators, null checks when pointers are assumed by the code to be non-null, and explicit unreachables.
llvm-svn: 224255
|