Eli Friedman [Fri, 7 Oct 2011 23:40:49 +0000 (23:40 +0000)]
Fix APInt::operator*= so that it computes the correct result for large integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141441
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 7 Oct 2011 23:29:53 +0000 (23:29 +0000)]
Don't emit the symbol table entry for the .symtab_shndx section either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141440
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 7 Oct 2011 23:28:32 +0000 (23:28 +0000)]
Remove extraneous curlies. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141439
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 7 Oct 2011 23:24:09 +0000 (23:24 +0000)]
ARM prefix asmparser operand kind enums for readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141438
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 7 Oct 2011 23:18:02 +0000 (23:18 +0000)]
Take all of the invoke basic blocks and make the dispatch basic block their new
successor. Remove the old landing pad from their successor list, because it's
now the successor of the dispatch block. Now that the landing pad blocks are no
longer the destination of invokes, we can mark them as normal basic blocks
instead of landing pads.
This more closely resembles what the CFG is actually doing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141436
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 7 Oct 2011 23:06:01 +0000 (23:06 +0000)]
Add a bool value to set the IsLandingPad flag to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141435
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 7 Oct 2011 22:08:37 +0000 (22:08 +0000)]
Take the code that was emitted for the llvm.eh.dispatch.setup intrinsic and emit
it with the new SjLj emitter stuff. This way there's no need to emit that
kind-of-hacky intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141419
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 7 Oct 2011 21:25:38 +0000 (21:25 +0000)]
Thread the chain through the eh.sjlj.setjmp intrinsic, like it's documented to
do. This will be useful later on with the new SJLJ stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141416
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 7 Oct 2011 20:58:24 +0000 (20:58 +0000)]
Don't emit a shstrtabindex in the reserved range. Spotted by inspection and
patch by Cary Coutant!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141413
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 7 Oct 2011 20:56:23 +0000 (20:56 +0000)]
Clarify/fix typo. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141412
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 7 Oct 2011 20:15:54 +0000 (20:15 +0000)]
Constrain both operands on MOVZX32_NOREXrr8.
This instruction is explicitly encoded without an REX prefix, so both
operands but be *_NOREX.
Also add an assertion to copyPhysReg() that fires when the MOV8rr_NOREX
constraints are not satisfied.
This fixes a miscompilation in
20040709-2 in the gcc test suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141410
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Oct 2011 19:52:41 +0000 (19:52 +0000)]
Fix a few changes I missed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141392
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Oct 2011 19:46:12 +0000 (19:46 +0000)]
Fix GCC again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141389
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Oct 2011 19:25:47 +0000 (19:25 +0000)]
Fix spelling in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141386
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Oct 2011 19:25:32 +0000 (19:25 +0000)]
Change relocation API to be per section. This time without breaking GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141385
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 7 Oct 2011 18:27:04 +0000 (18:27 +0000)]
Improve ARM assembly parser diagnostic for unexpected tokens.
Consider:
mov r8, r11 fred
Previously, we issued the not very informative:
x.s:6:1: error: unexpected token in argument list
^
Now we generate:
x.s:5:14: error: unexpected token in argument list
mov r8, r11 fred
^
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141380
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 7 Oct 2011 18:25:37 +0000 (18:25 +0000)]
Revert 141376 and 141377 due to breaking the build.
--- Reverse-merging r141377 into '.':
U tools/llvm-objdump/MachODump.cpp
--- Reverse-merging r141376 into '.':
U include/llvm/Object/COFF.h
U include/llvm/Object/ObjectFile.h
U include/llvm-c/Object.h
U tools/llvm-objdump/llvm-objdump.cpp
U lib/Object/MachOObjectFile.cpp
U lib/Object/COFFObjectFile.cpp
U lib/Object/Object.cpp
U lib/Object/ELFObjectFile.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141379
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Fri, 7 Oct 2011 18:25:05 +0000 (18:25 +0000)]
Remove Multidefs
Multidefs are a bit unwieldy and incomplete. Remove them in favor of
another mechanism, probably for loops.
Revert "Make Test More Thorough"
Revert "Fix a typo."
Revert "Vim Support for Multidefs"
Revert "Emacs Support for Multidefs"
Revert "Document Multidefs"
Revert "Add a Multidef Test"
Revert "Update Test for Multidefs"
Revert "Process Multidefs"
Revert "Parser Multidef Support"
Revert "Lexer Support for Multidefs"
Revert "Add Multidef Data Structures"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141378
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Oct 2011 18:15:40 +0000 (18:15 +0000)]
Fix spelling in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141377
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Fri, 7 Oct 2011 18:15:25 +0000 (18:15 +0000)]
Change relocation API to be per section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141376
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Oct 2011 17:26:38 +0000 (17:26 +0000)]
Jakob is the code owner of register allocation and TableGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141372
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 7 Oct 2011 17:21:44 +0000 (17:21 +0000)]
High bits of movmskp{s|d} and pmovmskb are known zero. rdar://
10247336
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141371
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 7 Oct 2011 17:17:49 +0000 (17:17 +0000)]
Reenable tail calls for iOS 5.0 and later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141370
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 7 Oct 2011 16:59:21 +0000 (16:59 +0000)]
Reenable use of divmod compiler_rt functions for iOS 5.0 and later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141368
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Fri, 7 Oct 2011 16:27:01 +0000 (16:27 +0000)]
Move default to top of switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141366
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 7 Oct 2011 16:15:08 +0000 (16:15 +0000)]
Peephole optimization for ABS on ARM.
Patch by Ana Pazos!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141365
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 7 Oct 2011 08:29:06 +0000 (08:29 +0000)]
Teach GVN to also propagate switch cases. For example, in this code
switch (n) {
case 27:
do_something(x);
...
}
the call do_something(x) will be replaced with do_something(27). In
gcc-as-one-big-file this results in the removal of about 500 lines of
bitcode (about 0.02%), so has about 1/10 of the effect of propagating
branch conditions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141360
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 7 Oct 2011 07:02:24 +0000 (07:02 +0000)]
Add X86 disassembler support for RDFSBASE, RDGSBASE, WRFSBASE, and WRGSBASE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141358
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 7 Oct 2011 06:33:09 +0000 (06:33 +0000)]
PostRA scheduler fix. Clear stale loop dependencies.
Fixes <rdar://problem/
10235725>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141357
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 7 Oct 2011 06:27:02 +0000 (06:27 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141356
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 7 Oct 2011 05:53:50 +0000 (05:53 +0000)]
Add X86 disassembler support for XSAVE, XRSTOR, and XSAVEOPT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141354
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 7 Oct 2011 05:35:38 +0000 (05:35 +0000)]
Revert part of r141274. Only need to change encoding for xchg %eax, %eax in 64-bit mode. This is because in 64-bit mode xchg %eax, %eax implies zeroing the upper 32-bits of RAX which makes it not a NOP. In 32-bit mode using NOP encoding is fine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141353
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 23:41:14 +0000 (23:41 +0000)]
Use the correct vreg here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141342
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 23:37:36 +0000 (23:37 +0000)]
Generate the dispatch code for a 'thumb' function. This is very similar to the
others. They take the call site value. Determine if it's a proper value. And
then jumps to the correct call site via a jump table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141341
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 6 Oct 2011 23:33:11 +0000 (23:33 +0000)]
Fix the check for nested IT instructions in the disassembler. We need to perform the check before adding the Thumb predicate, which pops on entry off the ITBlock queue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141339
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 6 Oct 2011 23:20:49 +0000 (23:20 +0000)]
Remove the old atomic instrinsics. autoupgrade functionality is included with this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141333
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 22:53:00 +0000 (22:53 +0000)]
Generate the dispatch table for ARM mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141327
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 22:18:16 +0000 (22:18 +0000)]
Refactor some of the code that sets up the entry block for SjLj EH. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141323
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 6 Oct 2011 22:04:05 +0000 (22:04 +0000)]
Tidy up tests. Un-XFAIL file and mark individual tests as FIXME instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141321
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 21:51:21 +0000 (21:51 +0000)]
Use a thumb ORR instead of thumb2 ORR when in thumb-only mode. (Picky! Picky!)
Place the immediate to OR into a register so that it works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141319
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 6 Oct 2011 21:32:50 +0000 (21:32 +0000)]
Fix and clean up tests. Un-XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141318
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 21:29:56 +0000 (21:29 +0000)]
* Set the low bit of the return address when we are in thumb mode.
* Some code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141317
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 6 Oct 2011 21:28:30 +0000 (21:28 +0000)]
Fix and clean up tests. Un-XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141316
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 6 Oct 2011 21:20:46 +0000 (21:20 +0000)]
Fix List-of-List Processing
Fix VarListElementInit::resolveListElementReference to return a
partially resolved VarListElementInint in the case where full
resolution is not possible. This allows TableGen to make forward
progress resolving certain complex list expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141315
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 6 Oct 2011 21:20:44 +0000 (21:20 +0000)]
Make Test More Thorough
Check that all ADD patters are processed.
Add a SUB test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141314
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 6 Oct 2011 20:59:09 +0000 (20:59 +0000)]
Fix -asserts build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141313
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 6 Oct 2011 20:00:33 +0000 (20:00 +0000)]
PTX: Implement signed division
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141306
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 6 Oct 2011 18:53:43 +0000 (18:53 +0000)]
Use StringSwitch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141305
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 6 Oct 2011 18:23:56 +0000 (18:23 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141299
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 6 Oct 2011 14:37:47 +0000 (14:37 +0000)]
Fix Typo
Compare the entire keyword string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141295
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 6 Oct 2011 13:39:59 +0000 (13:39 +0000)]
s/tblgen/llvm-tblgen/g in a few missed places, including the tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141294
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 6 Oct 2011 13:21:42 +0000 (13:21 +0000)]
Remove the Clang tblgen backends from LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141293
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:39:34 +0000 (12:39 +0000)]
Don't require C bindings opcode numbers to be kept in sync.
They are not in sync now, for example Bitcast would show up as LLVMCall.
So instead introduce 2 functions that map to and from the opcodes in the C
bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141290
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:13:32 +0000 (12:13 +0000)]
Add uwtable, returnstwice and nonlazybind to the C bindings also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141289
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:13:28 +0000 (12:13 +0000)]
ocaml/C bindings: type->isSized()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141288
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:13:20 +0000 (12:13 +0000)]
add binding to read icmp predicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141287
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:13:11 +0000 (12:13 +0000)]
ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141286
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:12:50 +0000 (12:12 +0000)]
C/OCaml API to retrieve struct name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141285
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:12:27 +0000 (12:12 +0000)]
ocaml bindings: add llvm_ipo based on IPO.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141284
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 6 Oct 2011 12:12:12 +0000 (12:12 +0000)]
add more tests for the OCaml bindings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141283
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 6 Oct 2011 06:44:41 +0000 (06:44 +0000)]
Fix assembling of xchg %eax, %eax to not use the NOP encoding of 0x90. This was done by creating a new register group that excludes AX registers. Fixes PR10345. Also added aliases for flipping the order of the operands of xchg <reg>, %eax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141274
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 6 Oct 2011 02:47:18 +0000 (02:47 +0000)]
Cosmetic change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141269
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 6 Oct 2011 01:51:51 +0000 (01:51 +0000)]
Build system infrastructure for multiple tblgens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141266
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 6 Oct 2011 00:53:33 +0000 (00:53 +0000)]
Add the MBBs before inserting the instructions. Doing it afterwards could lead
to an infinite loop because of the def-use chains.
Also use a frame load instead of store for the LD instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141263
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 6 Oct 2011 00:08:27 +0000 (00:08 +0000)]
Remove the TRI::getSubRegisterRegClass() hook.
This restores my karma after I added TRI::getSubClassWithSubReg().
Register constraints are applied 'backwards'. Starting from the
register class required by an instruction operand, the correct question
is: 'How can I constrain the super-register register class so all its
sub-registers satisfy the instruction constraint?' The
getMatchingSuperRegClass() hook answers that.
We never need to go 'forwards': Starting from a super-register register
class, what register class are the sub-registers in? The
getSubRegisterRegClass() hook did that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141258
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 5 Oct 2011 23:39:02 +0000 (23:39 +0000)]
Always merge profitable shifts on A9, not just when they have a single use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141248
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 5 Oct 2011 23:38:50 +0000 (23:38 +0000)]
Remove a check from ARM shifted operand isel helper methods, which were blocking
merging an lsl #2 that has multiple uses on A9. This shift is free, so there is
no problem merging it in multiple places. Other unprofitable shifts will not be
merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141247
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Oct 2011 23:28:57 +0000 (23:28 +0000)]
Get the proper call site numbers for the landing pads. Also remove a magic
number (18) for the proper addressing mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141245
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Oct 2011 23:26:10 +0000 (23:26 +0000)]
Add accessor method to check if the landing pad symbol has call site information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141244
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 23:16:44 +0000 (23:16 +0000)]
Fix a typo.
Fix the argument passed in the multidef example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141243
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:54 +0000 (22:42 +0000)]
Prefix Template Arg Names with Multiclass Name
For consistency, prefix multiclass template arg names with the
multiclass name followed by "::" to avoid name clashes among
multiclass arguments and other entities in the multiclass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141239
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:52 +0000 (22:42 +0000)]
Vim Support for Multidefs
Add vim highlighting support for multidefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141238
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:51 +0000 (22:42 +0000)]
Emacs Support for Multidefs
Add Emacs font-lock keyword support for multidefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141237
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:49 +0000 (22:42 +0000)]
Document Multidefs
Provide documentation for multidefs, explaining in detail how they
work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141236
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:48 +0000 (22:42 +0000)]
Update Test for Multidefs
Update the MultiPat.td test to create some defs via multidefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141235
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:47 +0000 (22:42 +0000)]
Add a Multidef Test
Add a simple test for multidefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141234
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:45 +0000 (22:42 +0000)]
Process Multidefs
Process each multidef declared in a multiclass. Iterate through the
list and instantiate a def in the multiclass for each item, resolving
the list item to the temporary iterator (possibly) used in the
multidef ObjectBody. We then process each generated def in the normal
way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141233
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:44 +0000 (22:42 +0000)]
Parser Multidef Support
Add parser support to recognize multidefs. No processing on the
multidef is done at this point. The grammar is:
MultiDef = MULTIDEF ObjectName < Value, Declaration, Value > ObjectBody
The first Value must be resolveable to a list and the second Value
must be resolveable to an integer. The Declaration is a temporary
value used as an iterator to refer to list items during processing.
It may be passed into the ObjectBody where it will be substituted with
the list value used to instantiate each def.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141232
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:35 +0000 (22:42 +0000)]
Lexer Support for Multidefs
Add keyword support for multidefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141231
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:17 +0000 (22:42 +0000)]
Add Multidef Data Structures
Add a set of data structures and members analogous to those used for
multiclass defs. These will represent a new kind of multiclass def: a
multidef. The idea behind the multidef is to process a list of items
and create a def record for each one inside the enclosing multiclass.
This allows the user to dynamically create a set of defs based on the
contents of a list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141230
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 5 Oct 2011 22:42:07 +0000 (22:42 +0000)]
Refactor Multiclass Def Processing
Move the code to instantiate a multiclass def, bind its arguments and
resolve its members into three helper functions. These will be reused
to support a new kind of multiclass def: a multidef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141229
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 5 Oct 2011 22:27:16 +0000 (22:27 +0000)]
PR11061: Make simplifylibcalls fold strcmp("", x) correctly.
While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141227
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Oct 2011 22:24:35 +0000 (22:24 +0000)]
Modify the mapping from landing pad to call sites to accept more than one call
site.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141226
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Oct 2011 22:20:38 +0000 (22:20 +0000)]
Add an ivar that maps a landing pad's EH symbol to the call sites that may jump
to the landing pad. This will be used by the back-end to generate the jump
tables for dispatching the arriving longjmp in sjlj eh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141224
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Oct 2011 22:16:11 +0000 (22:16 +0000)]
Small refactoring. Cache the FunctionInfo->MBB into a local variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141221
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Oct 2011 22:12:57 +0000 (22:12 +0000)]
Fix sub-register operand verification.
PhysReg operands are not allowed to have sub-register indices at all.
For virtual registers with sub-reg indices, check that all registers in
the register class support the sub-reg index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141220
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 5 Oct 2011 22:06:53 +0000 (22:06 +0000)]
Fixes PR11070 - assert in SCEV getConstantEvolvingPHIOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141219
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 5 Oct 2011 22:04:08 +0000 (22:04 +0000)]
Fix comment to reflect the new EH stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141218
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Oct 2011 21:22:53 +0000 (21:22 +0000)]
Remove unused DstSubIdx argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141214
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 5 Oct 2011 20:53:43 +0000 (20:53 +0000)]
Re-commit 141203, but much more conservative.
Just pull the instruction name, but don't change the order of anything
else. That keeps --debug happy and non-crashing, but doesn't change
how the worklist gets built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141210
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 5 Oct 2011 20:44:29 +0000 (20:44 +0000)]
Revert 141203. InstCombine is looping on unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141209
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Oct 2011 20:26:40 +0000 (20:26 +0000)]
Simplify EXTRACT_SUBREG emission.
EXTRACT_SUBREG is emitted as %dst = COPY %src:sub, so there is no need to
constrain the %dst register class. RegisterCoalescer will apply the
necessary constraints if it decides to eliminate the COPY.
The %src register class does need to be constrained to something with
the right sub-registers, though. This is currently done manually with
COPY_TO_REGCLASS nodes. They can possibly be removed after this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141207
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Oct 2011 20:26:33 +0000 (20:26 +0000)]
Override TRI::getSubClassWithSubReg for X86.
There are fewer registers with sub_8bit sub-registers in 32-bit mode
than in 64-bit mode. In 32-bit mode, sub_8bit behaves the same as
sub_8bit_hi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141206
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 5 Oct 2011 20:05:13 +0000 (20:05 +0000)]
Check for the returns_twice attribute in callsFunctionThatReturnsTwice. This
fixes PR11038, but there are still some cleanups to be done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141204
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 5 Oct 2011 20:05:00 +0000 (20:05 +0000)]
Update InstCombine worklist after instruction transform is complete.
When updating the worklist for InstCombine, the Add/AddUsersToWorklist
functions may access the instruction(s) being added, for debug output for
example. If the instructions aren't yet added to the basic block, this
can result in a crash. Finish the instruction transformation before
adjusting the worklist instead.
rdar://
10238555
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141203
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Wed, 5 Oct 2011 18:32:25 +0000 (18:32 +0000)]
PTX: Fixup a case where getRegClassFor() should be used instead of custom code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141199
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 5 Oct 2011 18:31:00 +0000 (18:31 +0000)]
Simplify INSERT_SUBREG emission.
The register class created by INSERT_SUBREG and SUBREG_TO_REG must be
legal and support the SubIdx sub-registers.
The new getSubClassWithSubReg() hook can compute that.
This may create INSERT_SUBREG instructions defining a larger register
class than the sub-register being inserted. That is OK,
RegisterCoalescer will constrain the register class as needed when it
eliminates the INSERT_SUBREG instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141198
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 5 Oct 2011 18:17:49 +0000 (18:17 +0000)]
Fix assertion string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141197
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 5 Oct 2011 18:16:09 +0000 (18:16 +0000)]
Make sure candidate for delay slot filler is not a return instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141196
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 5 Oct 2011 18:13:08 +0000 (18:13 +0000)]
Make this test less sensitive to codegen optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141195
91177308-0d34-0410-b5e6-
96231b3b80d8