Francois Pichet
b2042fbfe2
Remove unused OpcodeMask enumerator.
...
llvm-svn: 132062
2011-05-25 17:02:53 +00:00
Francois Pichet
fab3c58733
Fix MSVC warning: "is out of range for enum constant"
...
MSVC doesn't support 64 bit enum.
OpcodeMask is not used anywhere in the code base.
llvm-svn: 132057
2011-05-25 15:58:10 +00:00
Charles Davis
6b67ee5130
Add tests for .seh_savereg and .seh_savexmm parsing. Once again, fix the
...
buggy methods that parse these directives.
llvm-svn: 132045
2011-05-25 04:51:25 +00:00
Cameron Zwarich
5c410bd5f6
Restore an accidentally removed comment.
...
llvm-svn: 132044
2011-05-25 04:48:17 +00:00
Cameron Zwarich
4f47b296d8
Move some code to a more logical place.
...
llvm-svn: 132043
2011-05-25 04:45:29 +00:00
Cameron Zwarich
beae5f20e8
Make tTAILJMPr/tTAILJMPrND emit a tBX without a preceding MOV of PC to LR. This
...
fixes <rdar://problem/9495913>
llvm-svn: 132042
2011-05-25 04:45:27 +00:00
Cameron Zwarich
5a32e53e3f
Change the order of tBX's operands so that the predicate operands come after the
...
target register, matching BX. I filed this bug because I was confused at first:
PR10007 - ARM branch instructions have inconsistent predicate operand placement
<http://llvm.org/bugs/show_bug.cgi?id=10007 >
llvm-svn: 132041
2011-05-25 04:45:23 +00:00
Cameron Zwarich
08753a605b
Rename tBX_Rm to tBX.
...
llvm-svn: 132040
2011-05-25 04:45:20 +00:00
Cameron Zwarich
d9707488bb
Rename the existing tBX/tBXr9 instructions to tBX_CALL/tBXr9_CALL to better
...
reflect their actual meaning and match the ARM instructions.
llvm-svn: 132039
2011-05-25 04:45:14 +00:00
Andrew Trick
0aa40b2f8f
indvars: fixed IV cloning in -disable-iv-rewrite mode with associated
...
cleanup and overdue test cases.
llvm-svn: 132038
2011-05-25 04:42:22 +00:00
Charles Davis
14a32a9608
Add a test for .seh_pushframe parsing. Fix the bug exposed by it (and another
...
one I found by inspection).
llvm-svn: 132037
2011-05-25 04:08:15 +00:00
Rafael Espindola
70213c7c5f
Replace the -unwind-tables option with a per function flag. This is more
...
LTO friendly as we can now correctly merge files compiled with or without
-fasynchronous-unwind-tables.
llvm-svn: 132033
2011-05-25 03:44:17 +00:00
Akira Hatanaka
a5b11ee449
Fix lowering of DYNAMIC_STACKALLOC nodes.
...
llvm-svn: 132030
2011-05-25 02:20:00 +00:00
Charles Davis
967ee6a30b
Add a test for the .seh_handler directive. Fix problems with the parsing
...
method exposed by the test. While we're at it, simplify the .seh_proc
parsing method.
llvm-svn: 132028
2011-05-25 01:33:42 +00:00
Bruno Cardoso Lopes
3a4aae57f4
Fix PR9762
...
Enable the parsing of the operand "cpsr_all" for the ARM msr instruction
llvm-svn: 132026
2011-05-25 00:35:03 +00:00
Evan Cheng
d359a7cab3
Forgot dyn_cast check.
...
llvm-svn: 132025
2011-05-24 23:47:50 +00:00
Eric Christopher
4f193f9555
Implement the arm 'L' asm modifier.
...
Part of rdar://9119939
llvm-svn: 132024
2011-05-24 23:27:13 +00:00
Eric Christopher
a6d7ccb170
Implement the immediate part of the 'B' modifier.
...
Part of rdar://9119939
llvm-svn: 132023
2011-05-24 23:15:43 +00:00
Evan Cheng
9466b36c02
Fix LoopUnswitch bug. RewriteLoopBodyWithConditionConstant can delete a dead
...
case of a switch instruction. Back off this optimization when this would
eliminate all of the predecessors to the latch.
Sorry, I am unable to reduce a reasonably sized test case.
rdar://9486843
llvm-svn: 132022
2011-05-24 23:12:57 +00:00
Eric Christopher
4783e5e316
Add more unimplemented asm modifiers and some documentation of what they
...
do.
Part of rdar://9119939.
llvm-svn: 132015
2011-05-24 22:27:43 +00:00
Eric Christopher
03965fa3b6
Add support for the arm 'y' asm modifier.
...
Fixes part of rdar://9444657
llvm-svn: 132011
2011-05-24 22:10:34 +00:00
Charles Davis
d943eb05ed
Test basic SEH directive-parsing functionality. Fix a latent bug exposed by
...
this test.
llvm-svn: 132004
2011-05-24 21:22:53 +00:00
Akira Hatanaka
161f211628
Enable printing of immediates that do not fit in 16-bit. .cprestore can have
...
offsets that are larger than 0x10000.
llvm-svn: 132003
2011-05-24 21:22:21 +00:00
Eli Friedman
654dd382bc
Change condition for determining whether a function is small for inlining metrics so that very long functions
...
with few basic blocks are not re-analyzed.
llvm-svn: 131994
2011-05-24 20:22:24 +00:00
Charles Davis
1084ac5bb1
Implement the rest of the SEH directive-parsing methods in the COFFAsmParser.
...
Add a size alignment check to the .seh_stackalloc directive parser. Add a
more descriptive error message to the .seh_handler directive parser.
Add methods to the TargetAsmInfo struct in support of all this.
llvm-svn: 131992
2011-05-24 20:06:30 +00:00
Akira Hatanaka
f4c853e3e4
Implement byval structure argument passing. The following limitations or
...
deficiencies exist:
- Works only if ABI is o32.
- Zero-sized structures cannot be passed.
- There is a lot of redundancy in generated code.
llvm-svn: 131986
2011-05-24 19:18:33 +00:00
Eli Friedman
5ae1b40f55
Make instcombine O(N) instead of O(N^2) in code where the same simplifiable constant is used many times.
...
Part of rdar://9471075.
llvm-svn: 131979
2011-05-24 18:52:07 +00:00
Devang Patel
0b44360610
Remove dead code.
...
llvm-svn: 131974
2011-05-24 18:27:52 +00:00
Dan Gohman
5b2ad67709
Make DecomposeGEPExpression check SimplifyInstruction only
...
after checking for a GEP, so that it matches what GetUnderlyingObject
does. This fixes an obscure bug turned up by bugpoint in the testcase
for PR9931.
llvm-svn: 131971
2011-05-24 18:24:08 +00:00
Charles Davis
3ac82d9bb2
Add a method to TargetRegisterInfo to get the register number that the Win64 EH
...
scheme uses internally. Implement it for x86 (the only architecture that LLVM
supports for which this matters right now).
llvm-svn: 131969
2011-05-24 16:57:53 +00:00
Cameron Zwarich
e425894eaf
Clean up the lazy initialization of DIBuilder a bit.
...
llvm-svn: 131956
2011-05-24 06:00:08 +00:00
Cameron Zwarich
462b5db500
Make LoadAndStorePromoter preserve debug info and create llvm.dbg.values when
...
promoting allocas to SSA variables. Fixes <rdar://problem/9479036>.
llvm-svn: 131953
2011-05-24 03:10:43 +00:00
Rafael Espindola
8e44a53856
Explain FIXME.
...
llvm-svn: 131952
2011-05-24 03:10:31 +00:00
Rafael Espindola
176fe6a0e0
Fix the defaults for .eh_frame. We were marking it as writable.
...
llvm-svn: 131951
2011-05-24 02:50:20 +00:00
Evan Cheng
b5950697e8
- Teach SelectionDAG::isKnownNeverZero to return true (op x, c) when c is
...
non-zero.
- Teach X86 cmov optimization to eliminate the cmov from ctlz, cttz extension
when the source of X86ISD::BSR / X86ISD::BSF is proven to be non-zero.
rdar://9490949
llvm-svn: 131948
2011-05-24 01:48:22 +00:00
Akira Hatanaka
d0694fb652
Simplify offset calculation of stack frame objects for $gp restore location and
...
variable arguments in LowerCall and LowerFormalArguments. This should also fix
the bug in which handling of variable arguments is incorrect when the front-end
optimizes away unused fixed arguments.
llvm-svn: 131942
2011-05-24 00:23:52 +00:00
Devang Patel
5bce258c3d
Fix debug info for blocks' variable.
...
llvm-svn: 131940
2011-05-24 00:22:25 +00:00
Devang Patel
8a90970a54
Remove unnecessary comment.
...
llvm-svn: 131936
2011-05-23 23:16:14 +00:00
Akira Hatanaka
e2e584df0e
Expand f64 FPOW.
...
llvm-svn: 131928
2011-05-23 22:23:58 +00:00
Akira Hatanaka
5b696387f7
Add pattern for double-to-integer conversion. Patch by Sasa Stankovic.
...
llvm-svn: 131927
2011-05-23 22:16:43 +00:00
Devang Patel
e829168e05
Revert 121907 (it causes llc crash) and apply original patch from PR9817.
...
llvm-svn: 131926
2011-05-23 22:04:42 +00:00
Akira Hatanaka
daa4afec69
Fixes related to coding style.
...
llvm-svn: 131922
2011-05-23 21:13:59 +00:00
Dan Gohman
e6a4a2aa6f
When checking for signed multiplication overflow, watch out for INT_MIN and -1.
...
This fixes PR9845.
llvm-svn: 131919
2011-05-23 21:07:39 +00:00
Jim Grosbach
76f8f3d479
Propagate error correctly in the MC Asm parser for leading '$' expressions.
...
llvm-svn: 131918
2011-05-23 20:36:04 +00:00
Akira Hatanaka
123ee4388c
Fix MipsAsmPrinter::printSavedRegsBitmaskChange. Remove functions and variables
...
in MipsFunctionInfo that are no longer used.
llvm-svn: 131917
2011-05-23 20:34:30 +00:00
Chris Lattner
f58c2c02b5
clarify this, apparently it is confusing :)
...
llvm-svn: 131916
2011-05-23 20:17:44 +00:00
Akira Hatanaka
6ddbe02441
Change StackDirection from StackGrowsUp to StackGrowsDown.
...
The following improvements are accomplished as a result of applying this patch:
- Fixed frame objects' offsets (relative to either the virtual frame pointer or
the stack pointer) are set before instruction selection is completed. There is
no need to wait until Prologue/Epilogue Insertion is run to set them.
- Calculation of final offsets of fixed frame objects is straightforward. It is
no longer necessary to assign negative offsets to fixed objects for incoming
arguments in order to distinguish them from the others.
- Since a fixed object has its relative offset set during instruction
selection, there is no need to conservatively set its alignment to 4.
- It is no longer necessary to reorder non-fixed frame objects in
MipsFrameLowering::adjustMipsStackFrame.
llvm-svn: 131915
2011-05-23 20:16:59 +00:00
Devang Patel
37ab34a49f
Preserve debug info during iSel by keeping DanglingDebugInfoMap live until end of function.
...
Patch by Micah Villmow
llvm-svn: 131908
2011-05-23 17:44:13 +00:00
Devang Patel
5920de5c8c
While replacing all uses of a SDValue with another value, do not forget to transfer SDDbgValue.
...
llvm-svn: 131907
2011-05-23 17:35:08 +00:00
Devang Patel
791327d23b
Clear list of instructions without DebugLoc.
...
llvm-svn: 131906
2011-05-23 17:34:18 +00:00