summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Don't #include DerivedTypes.h from TargetData.h.Jay Foad2009-05-111-0/+1
| | | | llvm-svn: 71468
* Fix two wording errors that Duncan spotted.Dan Gohman2009-05-111-1/+1
| | | | llvm-svn: 71459
* Unbreak non-debug build.Evan Cheng2009-05-111-0/+8
| | | | llvm-svn: 71457
* Eliminate a compiler warning.Evan Cheng2009-05-111-0/+1
| | | | llvm-svn: 71456
* When scalarizing a vector BITCAST, check whether the operand has vectorDan Gohman2009-05-111-1/+2
| | | | | | | | type, rather than assume that it does. If the operand is not vector, it shouldn't be run through ScalarizeVectorOp. This fixes one of the testcases in PR3886. llvm-svn: 71453
* LLVM has unaligned loads and stores now.Dan Gohman2009-05-111-2/+1
| | | | llvm-svn: 71449
* Add terminal width detection to llvm::sys::Process. This is needed toDouglas Gregor2009-05-112-0/+53
| | | | | | fix Clang PRs 4148 and 4183. llvm-svn: 71448
* Upgrade this example to new-style syntax.Dan Gohman2009-05-111-5/+5
| | | | llvm-svn: 71447
* Convert a subtract into a negate and an add when it helps x86Dan Gohman2009-05-112-1/+71
| | | | | | address folding. llvm-svn: 71446
* remove some done things: we have nocapture and SROA is smarter.Chris Lattner2009-05-111-77/+13
| | | | llvm-svn: 71443
* add a noteChris Lattner2009-05-111-0/+35
| | | | llvm-svn: 71442
* Reverse a loop that is counting up to a maximum toDale Johannesen2009-05-111-6/+118
| | | | | | | | count down to 0 instead, under very restricted circumstances. Adjust 4 testcases in which this optimization fires. llvm-svn: 71439
* Shrink wrapping in PEI:John Mosby2009-05-111-610/+1066
| | | | | | | | | | | | | | | - reduces _static_ callee saved register spills and restores similar to Chow's original algorithm. - iterative implementation with simple heuristic limits to mitigate compile time impact. - handles placing spills/restores for multi-entry, multi-exit regions in the Machine CFG without splitting edges. - passes test-suite in LLCBETA mode. Added contains() method to ADT/SparseBitVector. llvm-svn: 71438
* Don't generate redundant casts of constant values when lowering calls toJay Foad2009-05-111-38/+29
| | | | | | memcpy, memmove and memset. llvm-svn: 71427
* Change TargetData::getIntPtrType() to return an IntegerType instead ofJay Foad2009-05-111-1/+1
| | | | | | just a Type. llvm-svn: 71426
* Fix more naming issues.Sanjiv Gupta2009-05-114-30/+69
| | | | | | | compiler libcalls start with .lib. now. fixed section names. llvm-svn: 71424
* Detect calls to compiler intrinsics and emit an extern declarations Sanjiv Gupta2009-05-114-10/+43
| | | | | | | | | | | only for those. These extern declarations to intrinsics are currently being emitted at the bottom of generated .s file, which works fine with gpasm(not sure about MPSAM though). PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any extern declarations (even if no intrinsics are being used), but that needs to be fixed in the linker itself. llvm-svn: 71423
* Needed #includes. Thanks Fritz van Bommel!Bill Wendling2009-05-101-0/+1
| | | | llvm-svn: 71413
* This is a large rewrite of how Dwarf info for inlined functions is handled.Bill Wendling2009-05-101-95/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DwarfWriter expects DbgScopes and DIEs to behave themselves according to DwarfWriter's rules. However, inlined functions violate these rules. There are two different types of DIEs associated with an inlined function: an abstract instance, which has information about the original source code for the function being inlined; and concrete instances, which are created for each place the function was inlined and point back to the abstract instance. This patch tries to stay true to this schema. It bypasses how regular DbgScopes and DIEs are created and used when necessary. It provides special handling for DIEs of abstract and concrete instances. This doesn't take care of all of the problems with debug info for inlined functions, but it's a step in the right direction. For one thing, llvm-gcc generates wrong IR (it's missing some llvm.dbg intrinsics at the point where the function's inlined) for this example: #include <stdio.h> static __inline__ __attribute__((always_inline)) int bar(int x) { return 4; } void foo() { long long b = 1; int Y = bar(4); printf("%d\n", Y); } while clang generates correct IR. llvm-svn: 71410
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-107-45/+86
| | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
* Module iterator contains list of filescope functions as well, we don't need ↵Sanjiv Gupta2009-05-101-2/+2
| | | | | | to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming. llvm-svn: 71394
* Add imm-reg and imm-mem patters for cmp on msp430Anton Korobeynikov2009-05-101-0/+14
| | | | | | (imm is allowed to be source operand, not dest...) llvm-svn: 71393
* Changed lowering and asmprinter to use ABI Names class called PAN.Sanjiv Gupta2009-05-107-202/+281
| | | | llvm-svn: 71386
* --- Reverse-merging r71370 into '.':Bill Wendling2009-05-101-34/+58
| | | | | | | | U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Revert r71370. llvm-svn: 71373
* A debug function start was not being recorded when the optimization level wasn'tBill Wendling2009-05-091-58/+34
| | | | | | | | None. However, we were always recording the region end. There's no longer a good reason for this code to be separated out between the different opt levels, as it was doing pretty much the same thing anyway. llvm-svn: 71370
* Oops. Don't forget to align single bb loops.Evan Cheng2009-05-091-1/+1
| | | | llvm-svn: 71363
OpenPOWER on IntegriCloud