summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add an assert to turn a segfault on an unsupported inlineDan Gohman2009-05-141-0/+2
| | | | | | asm construct into an assertion failure. llvm-svn: 71757
* Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.Mike Stump2009-05-141-0/+2
| | | | | | Radar 6867696 llvm-svn: 71750
* There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.Bill Wendling2009-05-131-21/+30
| | | | | | | Basically, there was a situation where it was getting an empty vector and doing a .back() on that. Which isn't cool. llvm-svn: 71746
* The IfConverter::MergeBlocks method appears to be used only to merge a basicBob Wilson2009-05-131-9/+4
| | | | | | | | block with its unique predecessor. Change the code to assert if that is not the case, instead of trying to handle situations where the block has multiple predecessors. llvm-svn: 71744
* Removing the HasBuiltinSetjmp flag and associated bits. Flagging the presenceJim Grosbach2009-05-133-8/+1
| | | | | | | | | of exception handling builtin sjlj targets in functions turns out not to be necessary. Marking the intrinsic implementation in the .td file as defining all registers is sufficient to get the context saved properly by the containing function. llvm-svn: 71743
* Revert a portion of Dan's change r71018 that I'm convinced is wrong.Bob Wilson2009-05-131-1/+1
| | | | | | | | | | | | | | | | | | | Dan was trying to catch the case where a basic block ends with a conditional branch to the fall-through block. In this case, all the instructions have been moved out of FromBBI, leaving it empty. It cannot end with a conditional branch. As the existing comment indicates, it will always fall through to the next block. If the block already had the next block (NBB) listed as a successor, the preceding loop has a check for that and does not remove it. Thus, we need to check and add the successor only when it is not already listed. With Dan's change, the empty block often ends up with the fall-through successor listed twice. This exposed the problem in pr4195, where CodePlacementOpt did not handle the same predecessor listed more than once. It is also at least partially responsible for pr4202 and probably a similar issue with Thumb branches being out of range. llvm-svn: 71742
* Merge adjacent conditional.Bob Wilson2009-05-131-2/+0
| | | | llvm-svn: 71741
* Remove an unused variable.Bob Wilson2009-05-131-3/+0
| | | | llvm-svn: 71740
* Fix some typos and spelling and grammar, mostly in comments, but also oneBob Wilson2009-05-131-21/+20
| | | | | | field name. No functional changes. llvm-svn: 71739
* Fix whitespacing (space after switch).Mike Stump2009-05-133-33/+32
| | | | llvm-svn: 71738
* Spelling correction s/builting/builtin/ and remove trailing whitespace in a ↵Jim Grosbach2009-05-131-10/+10
| | | | | | few places llvm-svn: 71735
* Run code placement optimization for targets that want it (arm and x86 for now).Evan Cheng2009-05-134-0/+6
| | | | llvm-svn: 71726
* Change MachineInstrBuilder::addReg() to take a flag instead of a list ofBill Wendling2009-05-1319-153/+196
| | | | | | | | | | | | booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). llvm-svn: 71722
* Handle some additonal cases of external weak globals.Dale Johannesen2009-05-131-4/+22
| | | | llvm-svn: 71717
* Move the bookkeeping of the debug scopes back to the place where itBill Wendling2009-05-131-20/+20
| | | | | | | | belonged. The variable declaration stuff wasn't happy with it where it was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it successfully. llvm-svn: 71714
* Don't generate a select whose operand is load of a weakDale Johannesen2009-05-131-0/+6
| | | | | | | external. These may have address 0 and are not safe to execute unconditionally. llvm-svn: 71688
* PEI: rename PEI.h to PrologEpilogInserter.h to adhere to file naming standardJohn Mosby2009-05-133-2/+2
| | | | llvm-svn: 71678
* calls in nothrow functions can be marked nothrow even if the calleeChris Lattner2009-05-131-0/+10
| | | | | | | is not known to be nothrow. This allows readnone/readonly functions to be deleted even if we don't know whether the callee can throw. llvm-svn: 71676
* Run through the list of globals once and sectionize all types of globlas ↵Sanjiv Gupta2009-05-134-38/+72
| | | | | | includeing declarations. Later emit them from their section lists. llvm-svn: 71661
* Avoid getting a compiler warningDuncan Sands2009-05-131-1/+1
| | | | | | | | IVUsers.cpp: In member function ‘bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)’: IVUsers.cpp:221: warning: ‘isSigned’ may be used uninitialized in this function with gcc-4.3. llvm-svn: 71654
* add IVUsers.cppChris Lattner2009-05-131-0/+1
| | | | llvm-svn: 71646
* add ShrinkWrapping.cppChris Lattner2009-05-131-0/+1
| | | | llvm-svn: 71645
* Fix PR4206 - crash in simplify lib callsChris Lattner2009-05-131-1/+1
| | | | llvm-svn: 71644
* Fix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regBLang Hames2009-05-131-0/+6
| | | | | | operand was killed, the kill needs to be removed from regB's VarInfo. llvm-svn: 71635
* Add three new helper routines, getNoopOrZeroExtend,Dan Gohman2009-05-131-0/+47
| | | | | | | | | getNoopOrSignExtend, and getTruncateOrNoop. These are similar to getTruncateOrZeroExtend etc., except that they assert that the conversion is either not widening or narrowing, as appropriate. These will be used in some upcoming fixes. llvm-svn: 71632
* Add an int64_t variant of abs, for host environmentsDale Johannesen2009-05-132-5/+5
| | | | | | | | | | | without one. Use it where we were using abs on int64_t objects. (I strongly suspect the casts to unsigned in the fragments in LoopStrengthReduce are not doing whatever the original intent was, but the obvious change to uint64_t doesn't work. Maybe later.) llvm-svn: 71612
* Add support for GCC compatible builtin setjmp and longjmp intrinsics. This isJim Grosbach2009-05-127-5/+60
| | | | | | | a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but rather used by the front-end as target hooks for exception handling. llvm-svn: 71610
* If header of inner loop is aligned, do not align the outer loop header. We ↵Evan Cheng2009-05-121-6/+33
| | | | | | don't want to add nops in the outer loop for the sake of aligning the inner loop. llvm-svn: 71609
* Teach TransferDeadness to delete truly dead instructions if they do not ↵Evan Cheng2009-05-122-21/+60
| | | | | | produce side effects. llvm-svn: 71606
* correct register class for tADDspi to GPR since the register will always be SPJim Grosbach2009-05-121-1/+1
| | | | llvm-svn: 71602
* More MSVC fixes -- class/struct conflicts.Bill Wendling2009-05-121-1/+1
| | | | llvm-svn: 71601
* Restructure PEI code:John Mosby2009-05-123-1307/+1375
| | | | | | | | | - moved shrink wrapping code from PrologEpilogInserter.cpp to new file ShrinkWrapping.cpp. - moved PEI pass definition into new shared header PEI.h. llvm-svn: 71588
* Switch to using IRBuilder throughout.Jay Foad2009-05-121-204/+195
| | | | llvm-svn: 71587
* 80 col violations.Evan Cheng2009-05-121-2/+4
| | | | llvm-svn: 71582
* Fixed a stack slot coloring with reg bug: do not update implicit use / def ↵Evan Cheng2009-05-122-16/+47
| | | | | | when doing forward / backward propagation. llvm-svn: 71574
* Fix up a few minor typos in comments.Bob Wilson2009-05-121-7/+7
| | | | llvm-svn: 71563
* Fix 80-col violations and remove trailing whitespace. No functional changes.Bob Wilson2009-05-121-69/+71
| | | | llvm-svn: 71562
* Iterate over globals once and sectionize them into appropriate sections.Sanjiv Gupta2009-05-124-78/+111
| | | | | | | Later in asmprinter, go over thsese sections and print them. Do not print empty sections. llvm-svn: 71560
* We do not need to create a label for external defs and decls,Sanjiv Gupta2009-05-122-17/+4
| | | | | | just emit a comment for readability. llvm-svn: 71544
* Mark mayLoad, mayStore for insns correctly and use themSanjiv Gupta2009-05-123-24/+14
| | | | | | to check if an insn is accessing memory during mem sel optimization. llvm-svn: 71537
* Fix pr4195: When iterating through predecessor blocks, break out of the loopBob Wilson2009-05-121-3/+3
| | | | | | | | | | | after finding the (unique) layout predecessor. Sometimes a block may be listed more than once, and processing it more than once in this loop can lead to inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not clear these values. There's no point in continuing the loop regardless. The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource test. llvm-svn: 71536
* Factor the code for collecting IV users out of LSR into an IVUsers class,Dan Gohman2009-05-124-930/+975
| | | | | | | | | | | | | | | | | | | | | | | | and generalize it so that it can be used by IndVarSimplify. Implement the base IndVarSimplify transformation code using IVUsers. This removes TestOrigIVForWrap and associated code, as ScalarEvolution now has enough builtin overflow detection and folding logic to handle all the same cases, and more. Run "opt -iv-users -analyze -disable-output" on your favorite loop for an example of what IVUsers does. This lets IndVarSimplify eliminate IV casts and compute trip counts in more cases. Also, this happens to finally fix the remaining testcases in PR1301. Now that IndVarSimplify is being more aggressive, it occasionally runs into the problem where ScalarEvolutionExpander's code for avoiding duplicate expansions makes it difficult to ensure that all expanded instructions dominate all the instructions that will use them. As a temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function to fix up instructions inserted by SCEVExpander. Fortunately, this code is contained, and can be easily removed once a more comprehensive solution is available. llvm-svn: 71535
* When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values.Dan Gohman2009-05-121-2/+12
| | | | | | | | | These values aren't analyzable, so they don't care if more information about the loop trip count can be had. Also, SCEVUnknown is used for a PHI while the PHI itself is being analyzed, so it needs to be left in the Scalars map. This fixes a variety of subtle issues. llvm-svn: 71533
* Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr toDan Gohman2009-05-121-2/+2
| | | | | | | | | | return the correct value when the cast operand is all zeros. This ought to be pretty rare, because it would mean that the regular SCEV folding routines missed a case, though there are cases they might legitimately miss. Also, it's unlikely anything currently using GetMinTrailingZeros cares about this case. llvm-svn: 71532
* Avoid unneeded SIB byte encoding. Patch by Zoltan Varga.Evan Cheng2009-05-122-2/+4
| | | | llvm-svn: 71520
* - Record that the debug info is actually used so that the label folder doesn'tBill Wendling2009-05-121-10/+10
| | | | | | | blast it away. - Move InlineInfo bookkeeping to bookkeep the correct debug info object. llvm-svn: 71519
* Fixed PR4090.Lang Hames2009-05-111-1/+16
| | | | llvm-svn: 71495
* Teach LSR to optimize more loop exit compares, i.e. change them to use ↵Evan Cheng2009-05-111-43/+139
| | | | | | | | postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values. Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch. llvm-svn: 71485
* Fix PR4188. TailMerging can't tolerate inexactDale Johannesen2009-05-111-0/+15
| | | | | | sucessor info. llvm-svn: 71478
* Apply patch review feedback.Evan Cheng2009-05-111-0/+2
| | | | llvm-svn: 71472
OpenPOWER on IntegriCloud