Akira Hatanaka
edacba83dc
Coding style fixes. Added comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132063 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 17:32:06 +00:00
Francois Pichet
1b47720391
Remove unused OpcodeMask enumerator.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132062 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 17:02:53 +00:00
Francois Pichet
0b5bb3b2b4
Fix 3 MSVC warnings:
...
'void (__cdecl *)()' differs in parameter lists from 'void (__cdecl *)(void)'
atexit really expects a "void f(void)" function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132061 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 16:32:33 +00:00
Francois Pichet
d9e57c146d
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132057 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 15:58:10 +00:00
Rafael Espindola
52f6a4de95
Fix some issues Duncan found in the previous commit.
...
I kept the reference to the ABI since that is the common case. The
-fno-asynchronous-unwind-tables option is a user controlled way of breaking
the ABI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132053 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 12:54:08 +00:00
Frits van Bommel
6cd71c6292
Fix warning in the CMake build about redefining LLVM_PATH_XDOT_PY by making sure both definitions are identical. This used to produce warnings like
...
In file included from .../llvm/trunk/tools/lto/LTOCodeGenerator.cpp:45:
In file included from .../llvm/trunk/include/llvm/Support/system_error.h:225:
.../include/llvm/Config/config.h:591:9: warning: 'LLVM_PATH_XDOT_PY' macro redefined
#define LLVM_PATH_XDOT_PY ".../bin/xdot.py"
^
.../include/llvm/Config/llvm-config.h:98:9: note: previous definition is here
#define LLVM_PATH_XDOT_PY ""
^
1 warning generated.
(Paths edited for clarity)
Note: This only affected people who had xdot.py installed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132050 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 06:32:23 +00:00
Argyrios Kyrtzidis
804cb23305
[tablegen] A couple of changes to ClangDiagnosticEmmitter.
...
-Emit an empty warning option as string ("") instead of 0.
-For diagnostic names also emit the size of the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132046 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 05:04:22 +00:00
Charles Davis
575630ccb8
Add tests for .seh_savereg and .seh_savexmm parsing. Once again, fix the
...
buggy methods that parse these directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132045 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:51:25 +00:00
Cameron Zwarich
da86a08284
Restore an accidentally removed comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132044 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:48:17 +00:00
Cameron Zwarich
8e9bace414
Move some code to a more logical place.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132043 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:45:29 +00:00
Cameron Zwarich
106acd4158
Make tTAILJMPr/tTAILJMPrND emit a tBX without a preceding MOV of PC to LR. This
...
fixes <rdar://problem/9495913>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132042 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:45:27 +00:00
Cameron Zwarich
328634598f
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 >
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132041 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:45:23 +00:00
Cameron Zwarich
8f161c3a95
Rename tBX_Rm to tBX.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132040 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:45:20 +00:00
Cameron Zwarich
b36c1ae6d5
Rename the existing tBX/tBXr9 instructions to tBX_CALL/tBXr9_CALL to better
...
reflect their actual meaning and match the ARM instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132039 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:45:14 +00:00
Andrew Trick
03d3d3b361
indvars: fixed IV cloning in -disable-iv-rewrite mode with associated
...
cleanup and overdue test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132038 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:42:22 +00:00
Charles Davis
47268164f3
Add a test for .seh_pushframe parsing. Fix the bug exposed by it (and another
...
one I found by inspection).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132037 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 04:08:15 +00:00
Rafael Espindola
fc2bb8c444
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132033 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 03:44:17 +00:00
Akira Hatanaka
053546c31e
Fix lowering of DYNAMIC_STACKALLOC nodes.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132030 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 02:20:00 +00:00
Charles Davis
309213279e
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132028 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 01:33:42 +00:00
Bruno Cardoso Lopes
56926a3961
Fix PR9762
...
Enable the parsing of the operand "cpsr_all" for the ARM msr instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132026 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-25 00:35:03 +00:00
Evan Cheng
21d378d735
Forgot dyn_cast check.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132025 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 23:47:50 +00:00
Eric Christopher
4db7dec70b
Implement the arm 'L' asm modifier.
...
Part of rdar://9119939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132024 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 23:27:13 +00:00
Eric Christopher
e1739d598d
Implement the immediate part of the 'B' modifier.
...
Part of rdar://9119939
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132023 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 23:15:43 +00:00
Evan Cheng
424641ef83
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132022 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 23:12:57 +00:00
Eric Christopher
fef50062ea
Add more unimplemented asm modifiers and some documentation of what they
...
do.
Part of rdar://9119939.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132015 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 22:27:43 +00:00
Eric Christopher
0628d38085
Add support for the arm 'y' asm modifier.
...
Fixes part of rdar://9444657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132011 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 22:10:34 +00:00
Dan Gohman
b0b0da72e9
Update documentation: -basicaa does chaining these days.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132010 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 22:01:32 +00:00
Akira Hatanaka
9ad65aed36
Test case for r132003.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132005 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 21:28:18 +00:00
Charles Davis
40de0e013a
Test basic SEH directive-parsing functionality. Fix a latent bug exposed by
...
this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132004 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 21:22:53 +00:00
Akira Hatanaka
ce98deb9f5
Enable printing of immediates that do not fit in 16-bit. .cprestore can have
...
offsets that are larger than 0x10000.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132003 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 21:22:21 +00:00
Eli Friedman
b176399339
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 20:22:24 +00:00
Charles Davis
3b32d0240c
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131992 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 20:06:30 +00:00
Akira Hatanaka
f29b9c0734
Fix test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131988 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 19:37:15 +00:00
Akira Hatanaka
26b47fd05b
Revision 131986 test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131987 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 19:29:37 +00:00
Akira Hatanaka
4231c7ea6d
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131986 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 19:18:33 +00:00
Eli Friedman
a4d4aeb387
Make instcombine O(N) instead of O(N^2) in code where the same simplifiable constant is used many times.
...
Part of rdar://9471075.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131979 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 18:52:07 +00:00
Devang Patel
8ec0c1c07b
Remove dead code.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131974 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 18:27:52 +00:00
Cameron Zwarich
d05667e703
Fix "make check" in Release by removing debug-only options from an 'opt' invocation.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131972 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 18:26:09 +00:00
Dan Gohman
9adf151b3d
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131971 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 18:24:08 +00:00
Charles Davis
6b918b8466
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131969 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 16:57:53 +00:00
Cameron Zwarich
13a16083ab
Clean up the lazy initialization of DIBuilder a bit.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131956 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 06:00:08 +00:00
Jakob Stoklund Olesen
dfa178bc2a
Work around code generation bug in Visual Studio 2010.
...
See http://llvm.org/pr9976 for details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131954 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 03:20:56 +00:00
Cameron Zwarich
c827939046
Make LoadAndStorePromoter preserve debug info and create llvm.dbg.values when
...
promoting allocas to SSA variables. Fixes <rdar://problem/9479036>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131953 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 03:10:43 +00:00
Rafael Espindola
e665798097
Explain FIXME.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131952 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 03:10:31 +00:00
Rafael Espindola
10c3e128ef
Fix the defaults for .eh_frame. We were marking it as writable.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131951 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 02:50:20 +00:00
Evan Cheng
b5a55d979c
- 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131948 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 01:48:22 +00:00
Evan Cheng
4992b03cbd
Remove dead option.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131947 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 01:43:38 +00:00
Andrew Trick
237f15d91f
FileCheck-ize a couple of IV unit tests.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131946 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 01:02:49 +00:00
Rafael Espindola
320ce564b3
Fix cmake dependencies.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131943 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 00:58:06 +00:00
Akira Hatanaka
b4d8d31e59
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131942 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-24 00:23:52 +00:00