summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a thinko: When lowering fneg with xor, bitcast the operandsDan Gohman2009-09-071-4/+17
| | | | | | | | | from floating-point to integer first, and bitcast the result back to floating-point. Previously, this test was passing by falling back to SelectionDAG lowering. The resulting code isn't as nice, but it's correct and CodeGen now stays on the fast path. llvm-svn: 81171
* LLVM currently represents floating-point negation as -0.0 - x. FixDan Gohman2009-09-031-0/+23
| | | | | | | FastISel to recognize this pattern and emit a floating-point negation using xor. llvm-svn: 80963
* Reapply 79977.Devang Patel2009-08-281-9/+6
| | | | | | Use MDNodes to encode debug info in llvm IR. llvm-svn: 80406
* Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.Devang Patel2009-08-261-6/+9
| | | | llvm-svn: 80073
* Update DebugInfo interface to use metadata, instead of special named ↵Devang Patel2009-08-251-9/+6
| | | | | | | | llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well. This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!) llvm-svn: 79977
* Record variable debug info at ISel time directly.Devang Patel2009-08-221-6/+1
| | | | llvm-svn: 79742
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-1/+2
| | | | llvm-svn: 78948
* Add contexts to some of the MVT APIs. No functionality change yet, just the ↵Owen Anderson2009-08-121-4/+4
| | | | | | infrastructure work needed to get the contexts to where they need to be first. llvm-svn: 78759
* Fix warnings.Owen Anderson2009-08-111-5/+3
| | | | llvm-svn: 78725
* Split EVT into MVT and EVT, the former representing _just_ a primitive type, ↵Owen Anderson2009-08-111-31/+30
| | | | | | | | while the latter is capable of representing either a primitive or an extended type. llvm-svn: 78713
* Rename MVT to EVT, in preparation for splitting SimpleValueType out into its ↵Owen Anderson2009-08-101-45/+45
| | | | | | own struct type. llvm-svn: 78610
* Start moving TargetLowering away from using full MVTs and towards ↵Owen Anderson2009-08-101-1/+1
| | | | | | SimpleValueType, which will simplify the privatization of IntegerType in the future. llvm-svn: 78584
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-2/+2
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-241-1/+1
| | | | | | thanks to contexts-on-types. More to come. llvm-svn: 77011
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-5/+5
| | | | llvm-svn: 76702
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-1/+1
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-131-3/+4
| | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. llvm-svn: 75445
* Simplify debug info intrisinc lowering.Devang Patel2009-07-021-66/+49
| | | | llvm-svn: 74733
* Simplify. Devang Patel2009-07-021-16/+17
| | | | llvm-svn: 74677
* llvm.dbg.declare is always used for local variable's debug info.Devang Patel2009-07-011-4/+1
| | | | llvm-svn: 74625
* mv CodeGen/DebugLoc.h Support/DebugLoc.hDevang Patel2009-06-191-1/+0
| | | | llvm-svn: 73786
* Gracefully handle imbalanced inline function begin and end markers.Devang Patel2009-06-151-1/+1
| | | | llvm-svn: 73426
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-12/+12
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Add a new codegen pass that normalizes dwarf exception handlingDuncan Sands2009-05-221-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | code in preparation for code generation. The main thing it does is handle the case when eh.exception calls (and, in a future patch, eh.selector calls) are far away from landing pads. Right now in practice you only find eh.exception calls close to landing pads: either in a landing pad (the common case) or in a landing pad successor, due to loop passes shifting them about. However future exception handling improvements will result in calls far from landing pads: (1) Inlining of rewinds. Consider the following case: In function @f: ... invoke @g to label %normal unwind label %unwinds ... unwinds: %ex = call i8* @llvm.eh.exception() ... In function @g: ... invoke @something to label %continue unwind label %handler ... handler: %ex = call i8* @llvm.eh.exception() ... perform cleanups ... "rethrow exception" Now inline @g into @f. Currently this is turned into: In function @f: ... invoke @something to label %continue unwind label %handler ... handler: %ex = call i8* @llvm.eh.exception() ... perform cleanups ... invoke "rethrow exception" to label %normal unwind label %unwinds unwinds: %ex = call i8* @llvm.eh.exception() ... However we would like to simplify invoke of "rethrow exception" into a branch to the %unwinds label. Then %unwinds is no longer a landing pad, and the eh.exception call there is then far away from any landing pads. (2) Using the unwind instruction for cleanups. It would be nice to have codegen handle the following case: invoke @something to label %continue unwind label %run_cleanups ... handler: ... perform cleanups ... unwind This requires turning "unwind" into a library call, which necessarily takes a pointer to the exception as an argument (this patch also does this unwind lowering). But that means you are using eh.exception again far from a landing pad. (3) Bugpoint simplifications. When bugpoint is simplifying exception handling code it often generates eh.exception calls far from a landing pad, which then causes codegen to assert. Bugpoint then latches on to this assertion and loses sight of the original problem. Note that it is currently rare for this pass to actually do anything. And in fact it normally shouldn't do anything at all given the code coming out of llvm-gcc! But it does fire a few times in the testsuite. As far as I can see this is almost always due to the LoopStrengthReduce codegen pass introducing pointless loop preheader blocks which are landing pads and only contain a branch to another block. This other block contains an eh.exception call. So probably by tweaking LoopStrengthReduce a bit this can be avoided. llvm-svn: 72276
* Temporarily revert r72191. It was causing an assert during llvm-gccBill Wendling2009-05-211-26/+12
| | | | | | bootstrapping. llvm-svn: 72200
* Introduce DebugScope which gets embedded into the machine instructions' ↵Argyrios Kyrtzidis2009-05-201-12/+26
| | | | | | | | DebugLoc. DebugScope refers to a debug region, function or block. llvm-svn: 72191
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-2/+2
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Revert 71165. It did more than just revert 71158 and it introducedDan Gohman2009-05-071-5/+3
| | | | | | several regressions. The problem due to 71158 is now fixed. llvm-svn: 71176
* Temporarily revert r71158. It was causing a failure during a full bootstrap:Bill Wendling2009-05-071-3/+5
| | | | | | | | | | | | | | | | | | | | | checking for bcopy... no checking for getc_unlocked... Assertion failed: (0 && "Unknown SCEV kind!"), function operator(), file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/Analysis/ScalarEvolution.cpp, line 511. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/libdecnumber/decUtility.c:360: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. make[4]: *** [decUtility.o] Error 1 make[4]: *** Waiting for unfinished jobs.... Assertion failed: (0 && "Unknown SCEV kind!"), function operator(), file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/Analysis/ScalarEvolution.cpp, line 511. /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/libdecnumber/decNumber.c:5591: internal compiler error: Abort trap Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://developer.apple.com/bugreporter> for instructions. make[4]: *** [decNumber.o] Error 1 make[3]: *** [all-stage2-libdecnumber] Error 2 make[3]: *** Waiting for unfinished jobs.... llvm-svn: 71165
* Make DwarfWriter::RecordInlinedFnStart more like the other DwarfWriter's ↵Argyrios Kyrtzidis2009-05-071-6/+5
| | | | | | | | | | | methods: -Have it return a label ID -Remove the unused Instruction parameter No functionality change. llvm-svn: 71132
* -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.Argyrios Kyrtzidis2009-05-041-8/+2
| | | | | | | | -Depend on DebugLocs for source line info. (Comes with Regression-Be-Gone(tm)) llvm-svn: 70871
* Revert r70803 for now, it causes a regression.Argyrios Kyrtzidis2009-05-031-1/+7
| | | | llvm-svn: 70811
* -Remove the DwarfWriter::RecordSourceLine calls from the instruction selectors.Argyrios Kyrtzidis2009-05-031-7/+1
| | | | | | -Depend on DebugLocs for source line info. llvm-svn: 70803
* -Move the DwarfWriter::ValidDebugInfo check to a static ↵Argyrios Kyrtzidis2009-05-031-34/+42
| | | | | | | | DIDescriptor::ValidDebugInfo -Create DebugLocs without the need to have a DwarfWriter around llvm-svn: 70682
* Make DebugLoc independent of DwarfWriter.Argyrios Kyrtzidis2009-04-301-13/+9
| | | | | | | | -Replace DebugLocTuple's Source ID with CompileUnit's GlobalVariable* -Remove DwarfWriter::getOrCreateSourceID -Make necessary changes for the above (fix callsites, etc.) llvm-svn: 70520
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-5/+5
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* Second attempt:Bill Wendling2009-04-291-5/+5
| | | | | | | | | | | | Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want to use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'll change the JIT with a follow-up patch. llvm-svn: 70343
* r70270 isn't ready yet. Back this out. Sorry for the noise.Bill Wendling2009-04-281-5/+5
| | | | llvm-svn: 70275
* Massive check in. This changes the "-fast" flag to "-O#" in llc. If you want toBill Wendling2009-04-281-5/+5
| | | | | | | | | | | use the old behavior, the flag is -O0. This change allows for finer-grained control over which optimizations are run at different -O levels. Most of this work was pretty mechanical. The majority of the fixes came from verifying that a "fast" variable wasn't used anymore. The JIT still uses a "Fast" flag. I'm not 100% sure if it's necessary to change it there... llvm-svn: 70270
* Do not treat beginning of inlined scope as beginning of normal function ↵Devang Patel2009-04-161-2/+10
| | | | | | | | | | | | | | | | | | | | | scope if the location info is missing. Insetad of doing ... if (inlined_subroutine && known_location) DW_TAG_inline_subroutine else DW_TAG_subprogram do if (inlined_subroutine) { if (known_location) DW_TAG_inline_subroutine } else { DW_TAG_subprogram } llvm-svn: 69300
* Record line number at the beginning of a func.start.Devang Patel2009-04-161-1/+1
| | | | | | This line was accidently lost yesterday. llvm-svn: 69286
* If location where the function was inlined is not know then do not emit ↵Devang Patel2009-04-161-5/+11
| | | | | | debug info describing inlinied region. llvm-svn: 69252
* Add DISubprogram is not null check.Devang Patel2009-04-151-2/+4
| | | | | | This fixes test/CodeGen//2009-01-21-invalid-debug-info.m test case. llvm-svn: 69210
* Construct and emit DW_TAG_inlined_subroutine DIEs for inlined subroutine ↵Devang Patel2009-04-151-14/+28
| | | | | | scopes (only in FastISel mode). llvm-svn: 69116
* Right now, Debugging information to encode scopes (DW_TAG_lexical_block) ↵Devang Patel2009-04-131-5/+5
| | | | | | | | relies on DBG_LABEL. Unfortunately this intefers with the quality of optimized code. This patch updates dwarf writer to encode scoping information in DWARF only in FastISel mode. llvm-svn: 68973
* Reapply 68847.Devang Patel2009-04-131-3/+15
| | | | | | Now debug_inlined section is covered by TAI->doesDwarfUsesInlineInfoSection(), which is false by default. llvm-svn: 68964
* make UpdateValueMap handle the possiblity that we could beChris Lattner2009-04-121-1/+1
| | | | | | copying into the right register, avoiding a copy. llvm-svn: 68889
* optimize FastISel::UpdateValueMap to avoid duplicate map lookups,Chris Lattner2009-04-121-7/+12
| | | | | | and make it return the assigned register. llvm-svn: 68888
* Revert r68847. It breaks the build on non-Darwin targets, with this messageDan Gohman2009-04-111-15/+3
| | | | | | | from the assembler: Error: unknown pseudo-op: `.debug_inlined' llvm-svn: 68863
* Keep track of inlined functions and their locations. This information is ↵Devang Patel2009-04-111-3/+15
| | | | | | | | collected when nested llvm.dbg.func.start intrinsics are seen. (Right now, inliner removes nested llvm.dbg.func.start intrinisics during inlining.) Create debug_inlined dwarf section using these information. This info is used by gdb, at least on Darwin, to enable better experience debugging inlined functions. See DwarfWriter.cpp for more information on structure of debug_inlined section. llvm-svn: 68847
OpenPOWER on IntegriCloud