summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Equal treatment of labels and other terminators in MI DAG construction.Sergei Larin2013-02-121-1/+1
| | | | | | | MI sched DAG construction allows targets to include terminators into scheduling DAG. Extend this functionality to labels as well. llvm-svn: 174977
* PR14562 - Truncation of left shift became undefPaul Redmond2013-02-121-2/+9
| | | | | | | | | | | DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32)) into (shl i32 v, 32) into undef. To prevent this, check the shift count against the final result size. Patch by: Kevin Schoedel Reviewed by: Nadav Rotem llvm-svn: 174972
* Don't consider definitions by other PHIs live-in when trimming a PHI source'sCameron Zwarich2013-02-121-1/+5
| | | | | | live range after inserting a copy at the end of a block. llvm-svn: 174945
* Fix indentation.Cameron Zwarich2013-02-121-2/+2
| | | | llvm-svn: 174944
* Add a hidden option to PHIElimination to split all critical edges. This isCameron Zwarich2013-02-121-4/+9
| | | | | | | particularly useful for catching issues with architectures that have exotic terminators like MIPS. llvm-svn: 174938
* Add blocks to the LiveIntervalAnalysis RegMaskBlocks array when splittingCameron Zwarich2013-02-121-2/+6
| | | | | | a critical edge. llvm-svn: 174936
* Fix the updating of LiveIntervals after splitting a critical edge. PHI operandCameron Zwarich2013-02-121-12/+3
| | | | | | | live ranges should always be extended, and the only successor that should be considered for extension of other ranges is the target of the split edge. llvm-svn: 174935
* Check type for legality before forming a select from loads.Pete Cooper2013-02-121-1/+3
| | | | | | | | Sorry for the lack of a test case. I tried writing one for i386 as i know selects are illegal on this target, but they are actually considered legal by isel and expanded later. I can't see any targets to trigger this, but checking for the legality of a node before forming it is general goodness. llvm-svn: 174934
* Add support for updating LiveIntervals to ↵Cameron Zwarich2013-02-112-1/+69
| | | | | | | | | | | | | | | MachineBasicBlock::SplitCriticalEdge(). This is currently a bit hairier than it needs to be, since depending on where the split block resides the end ListEntry of the split block may be the end ListEntry of the original block or a new entry. Some changes to the SlotIndexes updating should make it possible to eliminate the two cases here. This also isn't as optimized as it could be. In the future Liveinterval should probably get a flag that indicates whether the LiveInterval is within a single basic block. We could ignore all such intervals when splitting an edge. llvm-svn: 174870
* Update SlotIndexes after updateTerminator() possibly removes instructions. I amCameron Zwarich2013-02-111-0/+24
| | | | | | really trying to avoid piping SlotIndexes through to RemoveBranch() and friends. llvm-svn: 174869
* Revert "Rename LLVMContext diagnostic handler types and functions."Bob Wilson2013-02-111-5/+5
| | | | | | | | | This reverts my commit 171047. Now that I've removed my misguided attempt to support backend warnings, these diagnostics are only about inline assembly. It would take quite a bit more work to generalize them properly, so I'm just reverting this. llvm-svn: 174860
* Currently, codegen may spent some time in SDISel passes even if an entireEvan Cheng2013-02-112-8/+40
| | | | | | | | | | | | | | function is successfully handled by fast-isel. That's because function arguments are *always* handled by SDISel. Introduce FastLowerArguments to allow each target to provide hook to handle formal argument lowering. As a proof-of-concept, add ARMFastIsel::FastLowerArguments to handle functions with 4 or fewer scalar integer (i8, i16, or i32) arguments. It completely eliminates the need for SDISel for trivial functions. rdar://13163905 llvm-svn: 174855
* Remove unnecessary code.Evan Cheng2013-02-111-4/+0
| | | | llvm-svn: 174854
* Fix the unused but nearly correct method SlotIndexes::insertMBBInMaps() and addCameron Zwarich2013-02-101-0/+14
| | | | | | | | support for updating SlotIndexes to MachineBasicBlock::SplitCriticalEdge(). This calls renumberIndexes() every time; it should be improved to only renumber locally. llvm-svn: 174851
* Abstract the liveness checking in PHIElimination::SplitPHIEdges() to supportCameron Zwarich2013-02-101-2/+37
| | | | | | both LiveVariables and LiveIntervals. llvm-svn: 174850
* Add support for updating LiveIntervals to PHIElimination. If LiveIntervals areCameron Zwarich2013-02-101-29/+142
| | | | | | | | | | | | | | | | | | | present, it currently verifies them with the MachineVerifier, and this passed all of the test cases in 'make check' (when accounting for existing verifier errors). There were some assertion failures in the two-address pass, but they also happened on code without phis and look like they are caused by different kill flags from LiveIntervals. The only part that doesn't work is the critical edge splitting heuristic, because there isn't currently an efficient way to update LiveIntervals after splitting an edge. I'll probably start by implementing the slow fallback and test that it works before tackling the fast path for single-block ranges. The existing code that updates LiveVariables is fairly slow as it is. There isn't a command-line option for enabling this; instead, just edit PHIElimination.cpp to require LiveIntervals. llvm-svn: 174831
* Fix a typo.Cameron Zwarich2013-02-101-1/+1
| | | | llvm-svn: 174830
* Remove ancient references to 'atomic' phis in PHIElimination that don't reallyCameron Zwarich2013-02-101-12/+8
| | | | | | make sense anymore. llvm-svn: 174829
* Make LiveVariables an instance variable of PHIElimination.Cameron Zwarich2013-02-101-11/+9
| | | | llvm-svn: 174828
* Remove unneeded "TargetMachine.h" #includes.Jakub Staszak2013-02-095-5/+0
| | | | llvm-svn: 174817
* Dwarf: do not use line_table_start in at_stmt_list since we do not always emit Manman Ren2013-02-091-1/+4
| | | | | | line table entries in assembly. llvm-svn: 174785
* Remove the old liveness algorithm.Jakob Stoklund Olesen2013-02-091-308/+5
| | | | | | This is part of the plan to delete LiveVariables. llvm-svn: 174783
* Turn on -new-live-intervals by default.Jakob Stoklund Olesen2013-02-081-3/+3
| | | | | | | | This uses a liveness algorithm that does not depend on data from the LiveVariables analysis, it is the first step towards removing LiveVariables completely. llvm-svn: 174774
* Revert "Add LLVMContext::emitWarning methods and use them. ↵Bob Wilson2013-02-081-22/+14
| | | | | | | | | | | | | <rdar://problem/12867368>" This reverts r171041. This was a nice idea that didn't work out well. Clang warnings need to be associated with warning groups so that they can be selectively disabled, promoted to errors, etc. This simplistic patch didn't allow for that. Enhancing it to provide some way for the backend to specify a front-end warning type seems like overkill for the few uses of this, at least for now. llvm-svn: 174748
* DAGCombiner: Constant folding around pre-increment loads/storesHal Finkel2013-02-081-0/+89
| | | | | | | | | | | Previously, even when a pre-increment load or store was generated, we often needed to keep a copy of the original base register for use with other offsets. If all of these offsets are constants (including the offset which was combined into the addressing mode), then this is clearly unnecessary. This change adjusts these other offsets to use the new incremented address. llvm-svn: 174746
* Revert 172027 and 174336. Remove diagnostics about over-aligned stack objects.Bob Wilson2013-02-083-34/+20
| | | | | | | | | | | | Aside from the question of whether we report a warning or an error when we can't satisfy a requested stack object alignment, the current implementation of this is not good. We're not providing any source location in the diagnostics and the current warning is not connected to any warning group so you can't control it. We could improve the source location somewhat, but we can do a much better job if this check is implemented in the front-end, so let's do that instead. <rdar://problem/13127907> llvm-svn: 174741
* ARM cost model: Address computation in vector mem ops not freeArnold Schwaighofer2013-02-081-0/+5
| | | | | | | | | | | | | | | Adds a function to target transform info to query for the cost of address computation. The cost model analysis pass now also queries this interface. The code in LoopVectorize adds the cost of address computation as part of the memory instruction cost calculation. Only there, we know whether the instruction will be scalarized or not. Increase the penality for inserting in to D registers on swift. This becomes necessary because we now always assume that address computation has a cost and three is a closer value to the architecture. radar://13097204 llvm-svn: 174713
* "Clean up" line section symbol emission by emitting the sectionEric Christopher2013-02-072-8/+12
| | | | | | | syms before constructing the compile units so we're not emitting section references to sections not there already. llvm-svn: 174663
* 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
OpenPOWER on IntegriCloud