summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Clean up multiple skeleton compile units if we have multiple compileEric Christopher2013-02-062-8/+6
| | | | | | units coming in. llvm-svn: 174548
* Remove some dead code.Eric Christopher2013-02-062-34/+0
| | | | llvm-svn: 174547
* Tweak check to avoid integer overflow (for insanely large alignments)Evan Cheng2013-02-061-2/+2
| | | | llvm-svn: 174482
* Attempt to recover gdb bot after r174445.Manman Ren2013-02-061-0/+2
| | | | | | | | | Failure: undefined symbol 'Lline_table_start0'. Root-cause: we use a symbol subtraction to calculate at_stmt_list, but the line table entries are not dumped in the assembly. Fix: use zero instead of a symbol subtraction for Compile Unit 0. llvm-svn: 174479
* Dwarf: support for LTO where a single object file can have multiple line tablesManman Ren2013-02-051-2/+19
| | | | | | | | | We generate one line table for each compilation unit in the object file. Reviewed by Eric and Kevin. rdar://problem/13067005 llvm-svn: 174445
* Reapply r174343, with a fix for a scary DAG combine bug where it failed to ↵Owen Anderson2013-02-051-2/+5
| | | | | | | | | | | | | | | | | | differentiate between the alignment of the base point of a load, and the overall alignment of the load. This caused infinite loops in DAG combine with the original application of this patch. ORIGINAL COMMIT LOG: When the target-independent DAGCombiner inferred a higher alignment for a load, it would replace the load with one with the higher alignment. However, it did not place the new load in the worklist, which prevented later DAG combines in the same phase (for example, target-specific combines) from ever seeing it. This patch corrects that oversight, and updates some tests whose output changed due to slightly different DAGCombine outputs. llvm-svn: 174431
* Remove liveout lists from MachineRegisterInfo.Jakob Stoklund Olesen2013-02-053-16/+2
| | | | | | | | All targets are now adding return value registers as implicit uses on return instructions, and there is no longer a need for the live out lists. llvm-svn: 174417
* Remove special-casing of return blocks for liveness.Jakob Stoklund Olesen2013-02-056-142/+7
| | | | | | | Now that return value registers are return instruction uses, there is no need for special treatment of return blocks. llvm-svn: 174416
* Revert r174343, "When the target-independent DAGCombiner inferred a higher ↵NAKAMURA Takumi2013-02-051-5/+2
| | | | | | | | alignment for a load," It caused hangups in compiling clang/lib/Parse/ParseDecl.cpp and clang/lib/Driver/Tools.cpp in stage2 on some hosts. llvm-svn: 174374
* Construct a skeleton cu for each compile unit in the module, not justEric Christopher2013-02-051-5/+8
| | | | | | for the first compile unit. llvm-svn: 174352
* Add support for emitting a stub DW_AT_GNU_dwo_id as part of theEric Christopher2013-02-051-1/+7
| | | | | | DWARF5 split dwarf proposal. llvm-svn: 174350
* When the target-independent DAGCombiner inferred a higher alignment for a load,Owen Anderson2013-02-051-2/+5
| | | | | | | | | | | it would replace the load with one with the higher alignment. However, it did not place the new load in the worklist, which prevented later DAG combines in the same phase (for example, target-specific combines) from ever seeing it. This patch corrects that oversight, and updates some tests whose output changed due to slightly different DAGCombine outputs. llvm-svn: 174343
* [Stack Alignment] emit warning instead of a hard errorManman Ren2013-02-041-3/+3
| | | | | | | | | | | Per discussion in rdar://13127907, we should emit a hard error only if people write code where the requested alignment is larger than achievable and assumes the low bits are zeros. A warning should be good enough when we are not sure if the source code assumes the low bits are zeros. rdar://13127907 llvm-svn: 174336
* SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.Benjamin Kramer2013-02-041-44/+115
| | | | | | | | | | | | | | | | | This required disabling a PowerPC optimization that did the following: input: x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16> lowered to: tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8> x = ADD tmp, tmp The add now gets folded immediately and we're back at the BUILD_VECTOR we started from. I don't see a way to fix this currently so I left it disabled for now. Fix some trivially foldable X86 tests too. llvm-svn: 174325
* rdar://13126763Shuxin Yang2013-02-021-13/+20
| | | | | | | Fix a bug in DAGCombine. The symptom is mistakenly optimizing expression "x + x*x" into "x * 3.0". llvm-svn: 174239
* Correct indentation for dumping LexicalScope.Manman Ren2013-02-021-8/+6
| | | | llvm-svn: 174237
* [Dwarf] avoid emitting multiple AT_const_value for static memebers.Manman Ren2013-02-011-3/+9
| | | | | | | | Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1. rdar://problem/13071590 llvm-svn: 174235
* Fix errant fallthrough in the generation of the lifetime markers.Nadav Rotem2013-02-011-0/+1
| | | | | | Found by Alexander Kornienko. llvm-svn: 174207
* Use a continue to simplify loop and reduce indentation. No functional change.Chad Rosier2013-02-011-24/+25
| | | | llvm-svn: 174198
* Add braces, so my head doesn't explode.Chad Rosier2013-01-311-1/+2
| | | | llvm-svn: 174088
* When lowering memcpys to loads and stores, make sure we don't promote alignmentsLang Hames2013-01-311-0/+9
| | | | | | past the natural stack alignment. llvm-svn: 174085
* [Dwarf] early exit to avoid creating dangling DIEsManman Ren2013-01-311-1/+6
| | | | | | | | | | | | We used to create children DIEs for a scope, then check whether ScopeDIE is null. If ScopeDIE is null, the children DIEs will be dangling. Other DIEs can link to those dangling DIEs, which are not emitted at all, causing dwarf error. The current testing case is 4k lines, from MultiSource/BenchMark/McCat/09-vor. rdar://problem/13071959 llvm-svn: 174084
* [PEI] Pass the frame index operand number to the eliminateFrameIndex function.Chad Rosier2013-01-312-3/+17
| | | | | | | Each target implementation was needlessly recomputing the index. Part of rdar://13076458 llvm-svn: 174083
* Add a special handling case for untyped CopyFromReg node in GetCostForDef() ↵Weiming Zhao2013-01-291-1/+11
| | | | | | of ScheduleDAGRRList llvm-svn: 173833
* Support artificial parameters in function types.David Blaikie2013-01-291-0/+2
| | | | | | | Provides the functionality for Clang change r172911 - I just had this still lying around. llvm-svn: 173820
* Fixing warnings revealed by gcc release buildEdwin Vane2013-01-291-3/+2
| | | | | | | Fixed set-but-not-used warnings. Reviewer: gribozavr llvm-svn: 173810
* MIsched: cleanup code. Use isBoundaryNode().Andrew Trick2013-01-291-2/+4
| | | | llvm-svn: 173775
* Teach SDISel to combine fsin / fcos into a fsincos node if the followingEvan Cheng2013-01-293-9/+138
| | | | | | | | | | | | | | | | | | conditions are met: 1. They share the same operand and are in the same BB. 2. Both outputs are used. 3. The target has a native instruction that maps to ISD::FSINCOS node or the target provides a sincos library call. Implemented the generic optimization in sdisel and enabled it for Mac OSX. Also added an additional optimization for x86_64 Mac OSX by using an alternative entry point __sincos_stret which returns the two results in xmm0 / xmm1. rdar://13087969 PR13204 llvm-svn: 173755
* This patch addresses bug 15031.Bill Schmidt2013-01-282-9/+26
| | | | | | | | | | | | | | | | | | | | | | The common code in the post-RA scheduler to break anti-dependencies on the critical path contained a flaw. In the reported case, an anti-dependency between the overlapping registers %X4 and %R4 exists: %X29<def> = OR8 %X4, %X4 %R4<def>, %X3<def,dead,tied3> = LBZU 1, %X3<kill,tied1> The unpatched code breaks the dependency by replacing %R4 and its uses with %R3, the first register on the available list. However, %R3 and %X3 overlap, so this creates two overlapping definitions on the same instruction. The fix is straightforward, preventing selection of a register that overlaps any other defined register on the same instruction. The test case is reduced from the bug report, and verifies that we no longer produce "lbzu 3, 1(3)" when breaking this anti-dependency. llvm-svn: 173706
* Fix comment.Eric Christopher2013-01-281-1/+1
| | | | llvm-svn: 173698
* Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-281-1/+1
| | | | | | for refactoring the ARC Optimizer. llvm-svn: 173647
* Legalizer: Reword comment again, per Duncan's suggestion.Benjamin Kramer2013-01-271-3/+2
| | | | llvm-svn: 173625
* Legalizer: Add an assert and tweak a comment to clarify the assumptions this ↵Benjamin Kramer2013-01-271-1/+5
| | | | | | code makes. llvm-svn: 173620
* When the legalizer is splitting vector shifts, the result may not have the ↵Benjamin Kramer2013-01-271-2/+9
| | | | | | | | | | | | | | | right shift amount type. Fix that by adding a cast to the shift expander. This came up with vector shifts on sse-less X86 CPUs. <2 x i64> = shl <2 x i64> <2 x i64> -> i64,i64 = shl i64 i64; shl i64 i64 -> i32,i32,i32,i32 = shl_parts i32 i32 i64; shl_parts i32 i32 i64 Now we cast the last two i64s to the right type. Fixes the crash in PR14668. llvm-svn: 173615
* Use const reference instead of vector copying.Jakub Staszak2013-01-251-1/+2
| | | | llvm-svn: 173497
* This patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap,Preston Gurd2013-01-252-9/+9
| | | | | | | | | | | | | with an initial number of elements, instead of DenseMap, which has zero initial elements, in order to avoid the copying of elements when the size changes and to avoid allocating space every time LegalizeTypes is run. This patch will not affect the memory footprint, because DenseMap will increase the element size to 64 when the first element is added. Patch by Wan Xiaofei. llvm-svn: 173448
* MIsched: Print block name. No functionality.Andrew Trick2013-01-251-1/+2
| | | | llvm-svn: 173433
* MachineScheduler support for viewGraph.Andrew Trick2013-01-251-1/+88
| | | | llvm-svn: 173432
* ScheduleDAG: colorize the DOT graph and improve formatting.Andrew Trick2013-01-253-2/+10
| | | | llvm-svn: 173431
* ScheduleDAG: Added isBoundaryNode to conveniently detect a common corner case.Andrew Trick2013-01-251-7/+19
| | | | | | This fixes DAG subtree analysis at the boundary. llvm-svn: 173427
* SchedDFS: Complete support for nested subtrees.Andrew Trick2013-01-251-33/+74
| | | | | | | | | Maintain separate per-node and per-tree book-keeping. Track all instructions above a DAG node including nested subtrees. Seperately track instructions within a subtree. Record subtree parents. llvm-svn: 173426
* MIsched: Improve the interface to SchedDFS analysis (subtrees).Andrew Trick2013-01-252-34/+42
| | | | | | | Allow the strategy to select SchedDFS. Allow the results of SchedDFS to affect initialization of the scheduler state. llvm-svn: 173425
* SchedDFS: Initial support for nested subtrees.Andrew Trick2013-01-251-37/+73
| | | | | | | This is mostly refactoring, along with adding an instruction count within the subtrees and ensuring we only look at data edges. llvm-svn: 173420
* MISched: Add SchedDFSResult to ScheduleDAGMI to formalize theAndrew Trick2013-01-251-25/+55
| | | | | | interface and allow other strategies to select it. llvm-svn: 173413
* SchedDFS: Refactor and tweak the subtree selection criteria.Andrew Trick2013-01-251-24/+32
| | | | | | | | | | For sanity, create a root when NumDataSuccs >= 4. Splitting large subtrees will no longer be detrimental after my next checkin to handle nested tree. A magic number of 4 is fine because single subtrees seldom rejoin more than this. It makes subtrees easier to visualize and heuristics more sane. llvm-svn: 173399
* Avoid creating duplicate CFG edges in the IfConversion pass.Jakob Stoklund Olesen2013-01-241-1/+1
| | | | | | Patch by Stefan Hepp. llvm-svn: 173395
* MachineScheduler: enable biasCriticalPath for all DAGs.Andrew Trick2013-01-241-0/+4
| | | | llvm-svn: 173318
* MIsched: Added biasCriticalPath.Andrew Trick2013-01-241-0/+15
| | | | | | | Allow schedulers to order DAG edges by critical path. This makes DFS-based heuristics more stable and effective. llvm-svn: 173317
* Add the heuristic to differentiate SSPStrong from SSPRequired.Bill Wendling2013-01-231-23/+103
| | | | | | | | | | | | | | | | | | The requirements of the strong heuristic are: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) llvm-svn: 173231
* Add the IR attribute 'sspstrong'.Bill Wendling2013-01-231-0/+6
| | | | | | | | | | | | | | | | | | | | | SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. llvm-svn: 173230
OpenPOWER on IntegriCloud