summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Drop @llvm.annotation and @llvm.ptr.annotation intrinsics during codegen.Justin Holewinski2013-05-212-0/+11
| | | | | | | | | | The intrinsic calls are dropped, but the annotated value is propagated. Fixes PR 15253 Original patch by Zeng Bin! llvm-svn: 182387
* DAGCombine: Avoid an edge case where it tried to create an i0 type for (x & ↵Benjamin Kramer2013-05-211-1/+2
| | | | | | | | 0) == 0. Fixes PR16083. llvm-svn: 182357
* Dwarf: use a single line table to generate assembly when .loc is used.Manman Ren2013-05-211-3/+14
| | | | | | | | | This is to fix PR15408 where an undefined symbol Lline_table_start1 is used. Since we do not generate the debug_line section when .loc is used, Lline_table_start1 is not emitted and we can't refer to it when calculating at_stmt_list for a compile unit. llvm-svn: 182344
* PR14606: Debug Info for namespace aliases/DW_TAG_imported_moduleDavid Blaikie2013-05-201-0/+3
| | | | | | | | | This resolves the last of the PR14606 failures in the GDB 7.5 test suite by implementing an optional name field for DW_TAG_imported_modules/DIImportedEntities and using that to implement C++ namespace aliases (eg: "namespace X = Y;"). llvm-svn: 182328
* The DWARF EH pass doesn't need the TargetMachine, only the ↵Bill Wendling2013-05-202-5/+5
| | | | | | TargetLoweringBase like the other EH passes. llvm-svn: 182321
* No need to store the TargetMachine variable in this class.Bill Wendling2013-05-201-4/+2
| | | | llvm-svn: 182317
* Add LLVMContext argument to getSetCCResultTypeMatt Arsenault2013-05-1810-61/+81
| | | | llvm-svn: 182180
* Replace redundant codeMatt Arsenault2013-05-171-7/+2
| | | | | | | Use EVT::changeExtendedVectorElementTypeToInteger instead of doing the same thing that it does llvm-svn: 182165
* Add missing -*- C++ -*- to headersMatt Arsenault2013-05-171-1/+1
| | | | llvm-svn: 182164
* Generate debug info for by-value struct args even if they are not used.Adrian Prantl2013-05-161-1/+7
| | | | | | radar://problem/13865940 llvm-svn: 182062
* Remove addFrameMove.Rafael Espindola2013-05-161-33/+0
| | | | | | | Now that we have good testing, remove addFrameMove and create cfi instructions directly. llvm-svn: 182052
* DAGCombine: Also shrink eq compares where the constant is exactly as large ↵Benjamin Kramer2013-05-161-1/+1
| | | | | | | | | | | | as the smaller type. if ((x & 255) == 255) before: movzbl %al, %eax cmpl $255, %eax after: cmpb $-1, %al llvm-svn: 182038
* Add TargetRegisterInfo::getCoveringLanes().Jakob Stoklund Olesen2013-05-161-2/+4
| | | | | | | | This lane mask provides information about which register lanes completely cover super-registers. See the block comment before getCoveringLanes(). llvm-svn: 182034
* Fix legalization of SETCC with promoted integer intrinsicsHal Finkel2013-05-151-2/+13
| | | | | | | | | | | | | | | | | | If the input operands to SETCC are promoted, we need to make sure that we either use the promoted form of both operands (or neither); a mixture is not allowed. This can happen, for example, if a target has a custom promoted i1-returning intrinsic (where i1 is not a legal type). In this case, we need to use the promoted form of both operands. This change only augments the behavior of the existing logic in the case where the input types (which may or may not have already been legalized) disagree, and should not affect existing target code because this case would otherwise cause an assert in the SETCC operand promotion code. This will be covered by (essentially all of the) tests for the new PPCCTRLoops infrastructure. llvm-svn: 181926
* Fix miscompile due to StackColoring incorrectly merging stack slots (PR15707)Derek Schuff2013-05-151-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IR optimisation passes can result in a basic block that contains: llvm.lifetime.start(%buf) ... llvm.lifetime.end(%buf) ... llvm.lifetime.start(%buf) Before this change, calculateLiveIntervals() was ignoring the second lifetime.start() and was regarding %buf as being dead from the lifetime.end() through to the end of the basic block. This can cause StackColoring to incorrectly merge %buf with another stack slot. Fix by removing the incorrect Starts[pos].isValid() and Finishes[pos].isValid() checks. Just doing: Starts[pos] = Indexes->getMBBStartIdx(MBB); Finishes[pos] = Indexes->getMBBEndIdx(MBB); unconditionally would be enough to fix the bug, but it causes some test failures due to stack slots not being merged when they were before. So, in order to keep the existing tests passing, treat LiveIn and LiveOut separately rather than approximating the live ranges by merging LiveIn and LiveOut. This fixes PR15707. Patch by Mark Seaborn. llvm-svn: 181922
* Use only explicit bool conversion operatorsDavid Blaikie2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. llvm-svn: 181868
* Make getCompileUnit non-const and return the current DIE if itEric Christopher2013-05-142-3/+3
| | | | | | | happens to be a compile unit. Noticed on inspection and tested via calling on a newly created compile unit. No functional change. llvm-svn: 181835
* Add bitcast to store of personality function.Kai Nacke2013-05-141-1/+3
| | | | | | | | | | The personality function is user defined and may have an arbitrary result type. The code assumes always i8*. This results in an assertion failure if a different type is used. A bitcast to i8* is added to prevent this failure. Reviewed by: Renato Golin, Bob Wilson llvm-svn: 181802
* StackColoring: don't clear an instruction's mem operand if the underlyingAkira Hatanaka2013-05-141-0/+5
| | | | | | | object is a PseudoSourceValue and PseudoSourceValue::isConstant returns true (i.e., points to memory that has a constant value). llvm-svn: 181751
* Assert that DIEEntries are constructed with non-null DIEsDavid Blaikie2013-05-141-1/+3
| | | | | | | This just brings a crash a little further forward from DWARF emission to DIE construction to make errors easier to diagnose. llvm-svn: 181748
* Remove redundant variable introduced by r181682.Bob Wilson2013-05-131-1/+0
| | | | llvm-svn: 181721
* Fix PR15950 A bug in DAG Combiner about undef maskHao Liu2013-05-131-10/+25
| | | | llvm-svn: 181682
* Remove the MachineMove class.Rafael Espindola2013-05-135-38/+65
| | | | | | | | | | | | It was just a less powerful and more confusing version of MCCFIInstruction. A side effect is that, since MCCFIInstruction uses dwarf register numbers, calls to getDwarfRegNum are pushed out, which should allow further simplifications. I left the MachineModuleInfo::addFrameMove interface unchanged since this patch was already fairly big. llvm-svn: 181680
* StringRefize some debug accel table bits.Benjamin Kramer2013-05-113-7/+7
| | | | llvm-svn: 181663
* Change getFrameMoves to return a const reference.Rafael Espindola2013-05-111-3/+4
| | | | | | | To add a frame now there is a dedicated addFrameMove which also takes care of constructing the move itself. llvm-svn: 181657
* Remove more dead code.Rafael Espindola2013-05-112-13/+0
| | | | llvm-svn: 181656
* PR14492: Debug Info: Support for values of non-integer non-type template ↵David Blaikie2013-05-101-2/+18
| | | | | | | | | | parameters. This is only tested for global variables at the moment (& includes tests for the unnamed parameter case, since apparently this entire function was completely untested previously) llvm-svn: 181632
* DAGCombiner: Generate a correct constant for vector types when folding (xor ↵Benjamin Kramer2013-05-101-2/+1
| | | | | | | | (and)) into (and (not)). PR15948. llvm-svn: 181597
* Teach SelectionDAG to constant fold all-constant FMA nodes the same way that ↵Owen Anderson2013-05-091-0/+15
| | | | | | it constant folds FADD, FMUL, etc. llvm-svn: 181555
* Revert "Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)"Eric Christopher2013-05-091-15/+11
| | | | | | | | temporarily while investigating gdb.cp/templates.exp. This reverts commit r181471. llvm-svn: 181496
* Make sure debug info contains linkage names (DW_AT_MIPS_linkage_name)Eric Christopher2013-05-081-11/+15
| | | | | | | | | for constructors and destructors since the original declaration given by the AT_specification both won't and can't. Patch by Yacine Belkadi, I've cleaned up the testcases. llvm-svn: 181471
* DAGCombiner: Simplify inverted bit testsDavid Majnemer2013-05-081-0/+9
| | | | | | | | Fold (xor (and x, y), y) -> (and (not x), y) This removes an opportunity for a constant to appear twice. llvm-svn: 181395
* Debug Info: Support DW_TAG_imported_declarationDavid Blaikie2013-05-081-1/+3
| | | | | | | | | | | | | | This provides basic functionality for imported declarations. For subprograms and types some amount of lazy construction is supported (so the definition of a function can proceed the using declaration), but it still doesn't handle declared-but-not-defined functions (since we don't generally emit function declarations). Variable support is really rudimentary at the moment - simply looking up the existing definition with no support for out of order (declaration, imported_module, then definition). llvm-svn: 181392
* Finish renaming constructImportedModuleDIE to constructImportedEntityDIEDavid Blaikie2013-05-082-7/+7
| | | | llvm-svn: 181391
* Pass the MDNode in and do the insertion at compile unit creation timeEric Christopher2013-05-083-7/+7
| | | | | | instead of relying upon an extra call to finish initializing. llvm-svn: 181383
* Typo.Eric Christopher2013-05-081-2/+2
| | | | llvm-svn: 181378
* Rename DIImportedModule to DIImportedEntity and allow imported declarationsDavid Blaikie2013-05-072-16/+23
| | | | | | | | | DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. llvm-svn: 181364
* Remove exception handling support from the old JIT.Rafael Espindola2013-05-071-1/+0
| | | | llvm-svn: 181354
* Fix vselect when getSetCCResultType returns a different type from the operandsMatt Arsenault2013-05-071-3/+8
| | | | llvm-svn: 181348
* Debug Info: Fix for break due to r181271David Blaikie2013-05-071-0/+1
| | | | | | | | | Apparently we didn't keep an association of Compile Unit metadata nodes to DIEs so looking up that parental context failed & thus caused no DW_TAG_imported_modules to be emitted at the CU scope. Fix this by adding the mapping & sure up the test case to verify this. llvm-svn: 181339
* Fix the VS2010 build broken by r181271Timur Iskhodzhanov2013-05-071-1/+2
| | | | llvm-svn: 181296
* DebugInfo: Support imported modules in lexical blocksDavid Blaikie2013-05-063-6/+55
| | | | llvm-svn: 181271
* Remove unnecessary instance variable and rework logic accordingly.Eric Christopher2013-05-062-8/+5
| | | | llvm-svn: 181227
* Grammar.Eric Christopher2013-05-061-1/+2
| | | | llvm-svn: 181226
* Fix slightly too aggressive conact_vector optimization.Michael Kuperstein2013-05-061-0/+6
| | | | | | (Would sometimes optimize away conacts used to extend a vector with undef values) llvm-svn: 181186
* Teach if-converter to avoid removing BBs whose addresses are takne. ↵Evan Cheng2013-05-051-2/+19
| | | | | | rdar://13782395 llvm-svn: 181160
* InlineSpiller: Remove quadratic behavior.Benjamin Kramer2013-05-051-8/+11
| | | | | | No functionality change. llvm-svn: 181149
* For ARM backend, fixed "byval" attribute support.Stepan Dyatkovskiy2013-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Now even the small structures could be passed within byval (small enough to be stored in GPRs). In regression tests next function prototypes are checked: PR15293: %artz = type { i32 } define void @foo(%artz* byval %s) define void @foo2(%artz* byval %s, i32 %p, %artz* byval %s2) foo: "s" stored in R0 foo2: "s" stored in R0, "s2" stored in R2. Next AAPCS rules are checked: 5.5 Parameters Passing, C.4 and C.5, "ParamSize" is parameter size in 32bit words: -- NSAA != 0, NCRN < R4 and NCRN+ParamSize > R4. Parameter should be sent to the stack; NCRN := R4. -- NSAA != 0, and NCRN < R4, NCRN+ParamSize < R4. Parameter stored in GPRs; NCRN += ParamSize. llvm-svn: 181148
* Add ArrayRef constructor from None, and do the cleanups that this ↵Dmitri Gribenko2013-05-052-4/+4
| | | | | | | | constructor enables Patch by Robert Wilhelm. llvm-svn: 181138
* TiedTo flag can now be placed on implicit operands. isTwoAddrUse() should lookEvan Cheng2013-05-021-5/+3
| | | | | | | | | | | at all of the operands. Previously it was skipping over implicit operands which cause infinite looping when the two-address pass try to reschedule a two-address instruction below the kill of tied operand. I'm unable to come up with a reasonably sized test case. rdar://13747577 llvm-svn: 180906
OpenPOWER on IntegriCloud