summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2013-12-18Fix f64 and f128 for ppc-darwin.Rafael Espindola1-1/+3
This patch adds -f64:32:64 to 32 bit ppc darwin since a f64 inside a structure are only 32 bit aligned. The patch also drop -f128:64:128 from all ppc darwin, since f128 is 128 bit aligned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197574 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18One ppc32-darwin, a i64 inside a structure can have 32 bit alignment.Rafael Espindola1-1/+2
Thanks for Iain Sandoe for testing this with the original gcc. Clang was already getting this right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197572 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18ARM: update comment to match realityTim Northover1-1/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197570 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18DiagnosticInfo: Add missing namespaceTobias Grosser1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18ARM: set default float ABI based on triple.Tim Northover2-1/+7
Clang sets the float-abi target option manually, but no longer annotates each function with its ABI. This can lead to confusing mistmatch between "clang -emit-llvm | llc" and normal clang invocations. Besides which, gnueabihf actually *is* hard-float. Defaulting to soft was just perverse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197554 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18[AArch64 NEON]Implment loading vector constant form constant pool.Kevin Qin5-9/+79
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197551 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18AsmParser: add support for .end directiveSaleem Abdulrasool1-1/+22
The .end directive indicates the end of the file. No further instructions are processed after a .end directive is encountered. One potential (glaringly obvious) optimisation that could be pursued here is to extend MCAsmParser with a DiscardRemainder method to avoid processing lexemes to the end of the file. It was unclear at this point if that would be worth adding, and could easily be added in a follow on change. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197547 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17DebugInfo: Introduce new DIValue, DIETypeSignature to encode references to ↵David Blaikie6-36/+61
type units via their signatures This simplifies type unit and type unit reference creation as well as setting the stage for inter-type hashing across type unit boundaries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Fix N32 registers and stack alignment.Rafael Espindola1-1/+1
This patch fixes the "n" and "S" components of the data layout for mips. Clang already gets this right. This will be tested in clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Eliminate PPC instruction decoding ambiguitiesHal Finkel2-36/+47
The instruction definitions in the PPC backend have a number of variants defined for the same instruction to represent differences between 64-bit and 32-bit semantics. In order to generate a disassembler for the PPC backend, we need to mark all but one of these as CodeGen only. No functionality change intended; this is prep work for PPC disassembly support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197535 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17[DiagnosticPrinter] Use the appropriate method to print a Twine object in aQuentin Colombet1-1/+1
raw_ostream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197531 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17MC COFF: Emit the 'b' section flag for .bss sections in GNU assemblyReid Kleckner1-0/+2
Without this, assembling clang's disassembly would produce an object file with the IMAGE_SCN_CNT_INITIALIZED_DATA section characteristic rather than the uninitialized one. link.exe would warn when merging comdats with different flags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197529 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17On APCS, only try to align aggregates to 32 bits instead of 64.Rafael Espindola1-3/+3
This matches clang's behavior and since it is only a preference, it is not an ABI issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197526 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Handle i64 first for clarity. No functionality change.Rafael Espindola1-5/+6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197524 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Assert that the last operand is actually EFLAGSDuncan P. N. Exon Smith1-0/+6
This is another follow-up to r197503, after a post-commit review by Andy. <rdar://problem/15627766> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197520 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Disabled subregister copy coalescing during MachineCSE.Andrew Trick1-5/+15
This effectively backs out r197465 but leaves some of the general fixes in place. Not all targets are ready to handle this feature. To enable it, some infrastructure work is needed to better handle register class constraints. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Add warning capabilities in LLVM.Quentin Colombet7-7/+213
This reapplies r197438 and fixes the link-time circular dependency between IR and Support. The fix consists in moving the diagnostic support into IR. The patch adds a new LLVMContext::diagnose that can be used to communicate to the front-end, if any, that something of interest happened. The diagnostics are supported by a new abstraction, the DiagnosticInfo class. The base class contains the following information: - The kind of the report: What this is about. - The severity of the report: How bad this is. This patch also adds 2 classes: - DiagnosticInfoInlineAsm: For inline asm reporting. Basically, this diagnostic will be used to switch to the new diagnostic API for LLVMContext::emitError. - DiagnosticStackSize: For stack size reporting. Comes as a replacement of the hard coded warning in PEI. This patch also features dynamic diagnostic identifiers. In other words plugins can use this infrastructure for their own diagnostics (for more details, see getNextAvailablePluginDiagnosticKind). This patch introduces a new DiagnosticHandlerTy and a new DiagnosticContext in the LLVMContext that should be set by the front-end to be able to map these diagnostics in its own system. http://llvm-reviews.chandlerc.com/D2376 <rdar://problem/15515174> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197508 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17[mips] Fix off by one issue when applying a fixup.Matheus Almeida1-2/+2
The branch offset for a R_MIPS_PC16 relocation is indeed a 16-bit signed immediate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197506 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Revert "Revert "Mark vastart_save_xmm_regs as changing EFLAGS""Duncan P. N. Exon Smith2-3/+4
This reverts commit r197481, recommiting r197469 with an extra fix. The vastart_save_xmm_regs pseudo-instruction expands to a test and a branch, so it modifies EFLAGS. Mark it so, or else the scheduler might place it in the middle of another test+branch. This fixes a bug exposed by r192750, which changed the initial scheduler to source-order as part of enabling the MI Scheduler for X86. This re-commit changes the VASTART_SAVE_XMM_REGS custom inserter not to try to save %flags, and adds a test that catches the bad behavior of r197469. <rdar://problem/15627766> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197503 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Fix the pointer size for the PS3 datalayout.Rafael Espindola1-2/+5
This will be tested from clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197501 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Fix for PR18045:Stepan Dyatkovskiy1-3/+10
http://llvm.org/bugs/show_bug.cgi?id=18045 Short issue description: For X86 machines with sse < sse4.1 we got failures for some particular load/store vector sequences: $ clang-trunk -m32 -O2 test-case.c fatal error: error in backend: Cannot select: 0x4200920: v4i32,ch = load 0x41d6ab0, 0x4205850, 0x41dcb10<LD16[getelementptr inbounds ([4 x i32]* @e, i32 0, i32 0)](align=4)> [ORD=82] [ID=58] 0x4205850: i32 = X86ISD::Wrapper 0x41d5490 [ORD=26] [ID=43] 0x41d5490: i32 = TargetGlobalAddress<[4 x i32]* @e> 0 [ORD=26] [ID=23] 0x41dcb10: i32 = undef [ID=2] The reason is that EltsFromConsecutiveLoads could emit such load instruction both before and after legalize stage. Though this instruction is not legal for machines with SSSE3 and lower. The fix: In EltsFromConsecutiveLoads, if we have passed legalize stage, we check whether nodes it emits are legal. P.S.: If you get failure in time from 12:00 and till 22:00 (UTC-8), perhaps I'll slow with response, so you better reject this commit. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197492 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17There are no __register_frame and __deregister_frame functions Yaron Keren1-1/+1
when using structured exception handling (SEH) on Windows 64. http://llvm-reviews.chandlerc.com/D2378 Patch by Jonathan Liu! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197483 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17AVX-512: Added implementation of CONCAT_VECTORS for v8i1 vectors (by Alexey ↵Elena Demikhovsky4-1/+26
Bader). Added implementation of "truncate" from integer type (i64/i32/i16/i8) to i1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197482 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Revert "Mark vastart_save_xmm_regs as changing EFLAGS"Duncan P. N. Exon Smith1-1/+1
This reverts commit r197469. The sanitizer and dragonegg buildbots are failing, I think because of this change. Reverting until I figure out why. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197481 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Mark vastart_save_xmm_regs as changing EFLAGSDuncan P. N. Exon Smith1-1/+1
The vastart_save_xmm_regs pseudo-instruction expands to a test and a branch, so it modifies EFLAGS. Mark it so, or else the scheduler might place it in the middle of another test+branch. This fixes a bug exposed by r192750, which turned on the MI Scheduler for X86. <rdar://problem/15627766> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197469 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Allow MachineCSE to coalesce trivial subregister copies the same way that it ↵Andrew Trick4-12/+50
coalesces normal copies. Without this, MachineCSE is powerless to handle redundant operations with truncated source operands. This required fixing the 2-addr pass to handle tied subregisters. It isn't clear what combinations of subregisters can legally be tied, but the simple case of truncated source operands is now safely handled: %vreg11<def> = COPY %vreg1:sub_32bit; GR32:%vreg11 GR64:%vreg1 %vreg12<def> = COPY %vreg2:sub_32bit; GR32:%vreg12 GR64:%vreg2 %vreg13<def,tied1> = ADD32rr %vreg11<tied0>, %vreg12<kill>, %EFLAGS<imp-def> Test case: cse-add-with-overflow.ll. This exposed an existing bug in PPCInstrInfo::commuteInstruction. Thanks to Rafael for the test case: PowerPC/crash.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197465 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17whitespaceAndrew Trick1-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Make comment more explicit.Jim Grosbach1-3/+3
Re-reading the comment I updated in previous commit, it's better to make it more explicit and avoid ambiguity more effectively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197458 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Typo. s/reserved/preserved/Jim Grosbach1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Add a machine code print in DEBUG() following instruction selection.Jim Grosbach1-0/+3
Make debugging ISel a bit easier by printing out a dump of the generated code at the end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17Revert r197438 and r197447 until we figure out how to avoid circular ↵Quentin Colombet7-213/+7
dependency at link time git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197451 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17LoopVectorizer: Don't if-convert constant expressions that can trapArnold Schwaighofer1-1/+31
A phi node operand or an instruction operand could be a constant expression that can trap (division). Check that we don't vectorize such cases. PR16729 radar://15653590 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17[LLVM Diagnostic Capabilities] Remove useless includes fromQuentin Colombet1-2/+0
DiagnosticPrinter.cpp. These was creating a link time dependencies of IR on CodeGen and Analysis. Part of <rdar://problem/15515174> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197447 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Add warning capabilities in LLVM.Quentin Colombet7-7/+215
The patch adds a new LLVMContext::diagnose that can be used to communicate to the front-end, if any, that something of interest happened. The diagnostics are supported by a new abstraction, the DiagnosticInfo class. The base class contains the following information: - The kind of the report: What this is about. - The severity of the report: How bad this is. This patch also adds 2 classes: - DiagnosticInfoInlineAsm: For inline asm reporting. Basically, this diagnostic will be used to switch to the new diagnostic API for LLVMContext::emitError. - DiagnosticStackSize: For stack size reporting. Comes as a replacement of the hard coded warning in PEI. This patch also features dynamic diagnostic identifiers. In other words plugins can use this infrastructure for their own diagnostics (for more details, see getNextAvailablePluginDiagnosticKind). This patch introduces a new DiagnosticHandlerTy and a new DiagnosticContext in the LLVMContext that should be set by the front-end to be able to map these diagnostics in its own system. http://llvm-reviews.chandlerc.com/D2376 <rdar://problem/15515174> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197438 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Enable double to float shrinking optimizations for binary functions like ↵Yi Jiang3-9/+96
'fmin/fmax'. Fix radar:15283121 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197434 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16llvm-cov: Added -u option for unconditional branch info.Yuchen Wu1-8/+18
Outputs branch information for unconditional branches in addition to conditional branches. -b option must be enabled. Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197432 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16[Stackmap] Allow WebKit_JS calling convention to store 4 byte sized and ↵Juergen Ributzka1-5/+8
aligned arguments. This allows the WebKit_JS calling convention to perform partial writes on a 4 byte granularity to stack slots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197431 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Fix typo in instruction name.Matt Arsenault1-1/+1
SI_KIL -> SI_KILL git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197425 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Revert "Allow MachineCSE to coalesce trivial subregister copies the same way ↵Rafael Espindola2-35/+9
that it coalesces normal copies." This reverts commit r197414. It broke the ppc64 bootstrap. I will post a testcase in a sec. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16llvm-cov: Removed extra semicolon from ;;.Yuchen Wu1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197418 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16[Stackmap] The first integer argument is passed in register for the ↵Juergen Ributzka1-0/+4
WebKit_JS calling convention. Pass the first integer argument (callee) in register to optimize inline caches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197416 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Allow MachineCSE to coalesce trivial subregister copies the same wayAndrew Trick2-9/+35
that it coalesces normal copies. Without this, MachineCSE is powerless to handle redundant operations with truncated source operands. This required fixing the 2-addr pass to handle tied subregisters. It isn't clear what combinations of subregisters can legally be tied, but the simple case of truncated source operands is now safely handled: %vreg11<def> = COPY %vreg1:sub_32bit; GR32:%vreg11 GR64:%vreg1 %vreg12<def> = COPY %vreg2:sub_32bit; GR32:%vreg12 GR64:%vreg2 %vreg13<def,tied1> = ADD32rr %vreg11<tied0>, %vreg12<kill>, %EFLAGS<imp-def> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197414 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16whitespaceAndrew Trick1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197413 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16One last cleanup of LLVM's DataLayout strings.Rafael Espindola5-15/+16
Produce them in the same order on every target. The order is that of getStringRepresentation: e|E-i*-f*-v*-a*-s*-n*-S*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197411 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Structure R600's computeDataLayout more like every other target.Rafael Espindola1-8/+5
While there, simplify "p3:32:32:32" to "p3:32:32". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197407 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Recognize EABIHF as environment and use it for RTAPI + VFP.Joerg Sonnenberger3-1/+5
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197405 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16[AArch64] Fix v1fx patterns for Floating-point Multiply Extend and ↵Chad Rosier1-8/+11
Floating-point Compare to Zero. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197402 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16MemoryBuffer: Increase the alignment of small file buffers to 16Reid Kleckner1-2/+3
This was manifesting as an LLVM_ASSUME_ALIGNED() failure in an ELF debug info test when building LLVM with clang in the Microsoft C++ ABI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197401 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16The preferred alignment defaults to the abi alignment. Omit if it is the same.Rafael Espindola11-19/+19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197400 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16Don't duplicate the DataLayout defaults for integer, floats and vectors.Rafael Espindola2-9/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197398 91177308-0d34-0410-b5e6-96231b3b80d8