Commit Graph

80624 Commits

Author SHA1 Message Date
Daniel Dunbar fbd12cc36c MC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I believe this fixes the last memory leaks under test/MC.
llvm-svn: 99102
2010-03-20 22:36:38 +00:00
Daniel Dunbar d9d5b315ab llvm-mc: Fix MCInstPrinter memory leaks.
llvm-svn: 99101
2010-03-20 22:36:35 +00:00
Daniel Dunbar 98055cc154 MC/Mach-O: Remove Darwin host specific tests, we don't need them anymore.
llvm-svn: 99100
2010-03-20 22:36:32 +00:00
Daniel Dunbar 9f4f9f9cf4 MC/Mach-O: Tweak optimal_nop test to be host independent.
- This also avoids us running valgrind on /usr/bin/as, which has leaks. :)

llvm-svn: 99099
2010-03-20 22:36:29 +00:00
Daniel Dunbar c5621ed07a llvm-mc: Fix memory leak of MCAsmInfo.
llvm-svn: 99098
2010-03-20 22:36:25 +00:00
Daniel Dunbar fed917e078 TargetRegistry: Fix create{AsmInfo,MCDisassembler} to return non-const objects.
llvm-svn: 99097
2010-03-20 22:36:22 +00:00
Bob Wilson 162242b63b pr6652: Use LDM to restore PC to the return address on ARMv4.
Patch by John Tytgat!

llvm-svn: 99096
2010-03-20 22:20:40 +00:00
Bob Wilson ae08a736d6 Re-commit r98683 ("remove redundant writeback flag from ARM address mode 6")
with changes to add a separate optional register update argument.  Change all
the NEON instructions with address register writeback to use it.

llvm-svn: 99095
2010-03-20 22:13:40 +00:00
Bob Wilson 59e5141d44 Add instruction variants for VST2, VST3, and VST4 "store-lane" operations with
address register writeback.

llvm-svn: 99094
2010-03-20 21:57:36 +00:00
Bob Wilson b18adef4ad Add variants of VST2, VST3 and VST4 with address register writeback, and
rewrite the existing VST3 and VST4 instructions to use the same classes as
the others.

llvm-svn: 99093
2010-03-20 21:45:18 +00:00
Bob Wilson 89ba42c4ce Add instructions for double-spaced VST3 and VST4 without address register
writeback, and refactor the existing double-spaced VST2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

llvm-svn: 99090
2010-03-20 21:15:48 +00:00
Daniel Dunbar 9b9a46c3f2 tests: Mangle '-vg' onto the end of the triple when running under valgrind, so
we can use the standard XFAIL and XTARGET to conditional tests based on
valgrind.

llvm-svn: 99089
2010-03-20 21:13:08 +00:00
Daniel Dunbar e848de3911 tests: Mangle '-vg' onto the end of the triple when running under valgrind, so
we can use the standard XFAIL and XTARGET to conditional tests based on
valgrind.

llvm-svn: 99088
2010-03-20 21:12:48 +00:00
Ted Kremenek b45ebee521 Don't bother running the analysis for CFG-based warnings if the
declaration is in a system header.

llvm-svn: 99087
2010-03-20 21:11:09 +00:00
Ted Kremenek 918fe8498d Refactor CFG-based warnings in Sema to be run by a worked object called AnalysisBasedWarnings.
This object controls when the warnings are executed, allowing the client code
in Sema to selectively disable warnings as needed.

Centralizing the logic for analysis-based warnings allows us to optimize
when and how they are run.

Along the way, remove the redundant logic for the 'check fall-through' warning
for blocks; now the same logic is used for both blocks and functions.

llvm-svn: 99085
2010-03-20 21:06:02 +00:00
Gabor Greif febf6ab718 Add a setCalledFunction member to InvokeInst (like in CallInst)
and use this (as well as getCalledValue) to access the callee,
instead of {g|s}etOperand(0).

llvm-svn: 99084
2010-03-20 21:00:25 +00:00
Bob Wilson 322cbff3d3 Add VST1 instructions with address register writeback.
llvm-svn: 99083
2010-03-20 20:54:36 +00:00
Bob Wilson 9152d96dfb Add instruction variants for VLD2, VLD3, and VLD4 "load-lane" operations with
address register writeback.

llvm-svn: 99082
2010-03-20 20:47:18 +00:00
Bob Wilson 9b1584245a Tidy some more comments and whitespace.
llvm-svn: 99081
2010-03-20 20:39:53 +00:00
Bob Wilson cf324658f6 Add variants of VLD2, VLD3 and VLD4 with address register writeback, and
rewrite the existing VLD3 and VLD4 instructions to use the same classes as
the others.

llvm-svn: 99080
2010-03-20 20:10:51 +00:00
Bob Wilson 7ee900da22 Tidy some comments and whitespace for consistency.
llvm-svn: 99078
2010-03-20 19:57:03 +00:00
David Chisnall 12ae54d42f Fixed synthesizing properties declared in properties (GNU runtime).
llvm-svn: 99077
2010-03-20 19:53:29 +00:00
Bob Wilson c0795f8b87 Rename some instructions for consistency and sanity: use "_UPD" suffix for
load/stores with address register writeback, and use "odd" suffix to distinguish
instructions to access odd numbered registers (instead of "a" and "b").
No functional changes.

llvm-svn: 99066
2010-03-20 18:35:24 +00:00
Bob Wilson d092669b48 Add instructions for double-spaced VLD3 and VLD4 without address register
writeback, and refactor the existing double-spaced VLD2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

llvm-svn: 99065
2010-03-20 18:14:26 +00:00
Ted Kremenek 3460b539df Reapply r99024 (but with the memory issue now fixed).
llvm-svn: 99064
2010-03-20 18:02:01 +00:00
Ted Kremenek 92713e7ec3 Check if a BugReporterVisitor has already been added to a BugReporterContext.
This avoids redundant diagnostics.

llvm-svn: 99063
2010-03-20 18:01:57 +00:00
Bob Wilson 496766cb56 Add VLD1 instructions with address register writeback.
llvm-svn: 99062
2010-03-20 17:59:03 +00:00
Benjamin Kramer 73fc06f60f PIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued std::list of leaked char*.
llvm-svn: 99061
2010-03-20 17:41:18 +00:00
Ted Kremenek c719277435 Fix use-of-invalid-memory found by Valgrind and Windows buildbots.
We were inserting a value into a std::vector<> while iterating over
it, which could cause the underlying memory to get deallocated
and reallocated.  While not the best solution, use an llvm::ImmutableList
for now as it is safely supports insertions during iteration.

llvm-svn: 99058
2010-03-20 15:45:06 +00:00
Daniel Dunbar e543a5e684 Driver: Fix thinkos that prevented Clang from picking the right deployment
target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set.

llvm-svn: 99055
2010-03-20 08:47:42 +00:00
Daniel Dunbar 6a8efa8a79 Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.
llvm-svn: 99054
2010-03-20 08:01:59 +00:00
Daniel Dunbar 7c4de04c30 Driver: Fix -### to quote shell special characters, following gcc.
llvm-svn: 99053
2010-03-20 08:01:53 +00:00
Eric Christopher 595ecbe5c4 Add sse4.2 support to this test.
llvm-svn: 99052
2010-03-20 07:48:45 +00:00
Eric Christopher 08f135274d Add sse4.2 header and builtin support.
llvm-svn: 99051
2010-03-20 07:43:28 +00:00
Daniel Dunbar 4ff562d557 IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.

llvm-svn: 99050
2010-03-20 07:04:11 +00:00
Bob Wilson 2497d85c9e Revert the rest of 98679.
--- Reverse-merging r98679 into 'lib/Target/ARM/ARMInstrVFP.td':
U    lib/Target/ARM/ARMInstrVFP.td

llvm-svn: 99049
2010-03-20 06:34:02 +00:00
Bob Wilson 614d1fdfc3 Fix a very bad typo. Since the register number was off by one, the ARM
load/store optimizer would incorrectly think that registers D26 and D28
were consecutive and would generate a VLDM instruction to load them.
The assembler was not convinced.

llvm-svn: 99043
2010-03-20 06:05:13 +00:00
Daniel Dunbar 4c43e31d21 Evaluate: Fix a subtle bug in the pointer evaluator in which we would do an
expression computation in the wrong bit-width, and end up generating a totally
bogus array reference (_g0+8589934546).
 - This showed up on Prolangs/cdecl.

llvm-svn: 99042
2010-03-20 05:53:45 +00:00
Daniel Dunbar e46b52a35f Driver: Fix a number of -fapple-kext issues:
- Disable RTTI.
 - Disable use of __cxa_atexit.
 - Disable unwind tables.
 - Enable freestanding mode.

Also, honor -fhosted correctly.

<rdar://problem/7515383> C++ support: -fapple-kext not honored

llvm-svn: 99041
2010-03-20 04:52:14 +00:00
Daniel Dunbar 4e3e0991e9 Revert r99024, "Augment path diagnostics to include displaying when a message
expression", statistical evidence indicates it has some kind of memory error.

llvm-svn: 99040
2010-03-20 04:28:39 +00:00
Daniel Dunbar fe06df4bf3 C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...

Also, rename the __cxx_global_initialization function just to match llvm-gcc.

llvm-svn: 99039
2010-03-20 04:15:41 +00:00
Daniel Dunbar 7572284f4f IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.
llvm-svn: 99038
2010-03-20 04:15:29 +00:00
John McCall 2d8c760df7 Implement -Wshadow for parameter declarations as well.
llvm-svn: 99037
2010-03-20 04:12:52 +00:00
Dan Gohman 1a2abe5580 Clear the SCEVExpander's insertion point after making deletions,
so that the SCEVExpander doesn't retain a dangling pointer as its
insert position. The dangling pointer in this case wasn't ever used
to insert new instructions, but it was causing trouble with
SCEVExpander's code for automatically advancing its insert position
past debug intrinsics.

This fixes use-after-free errors that valgrind noticed in
test/Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll and
test/Transforms/IndVarSimplify/exit_value_tests.ll.

llvm-svn: 99036
2010-03-20 03:53:53 +00:00
Evan Cheng b8d1fd0553 Stupid svn. Add back to the lost sibcall tests.
llvm-svn: 99033
2010-03-20 03:17:05 +00:00
Evan Cheng 3f6f769c4f If call result is in ST0 and it is not being passed to the caller's
caller, then it is not safe to optimize the call into a sibcall since
the call result has to be popped off the x87 stack.

llvm-svn: 99032
2010-03-20 02:58:15 +00:00
Daniel Dunbar 5ea5fab22b Better fix for r98994, MachObjectWriterImpl wasn't intended to be virtual.
llvm-svn: 99031
2010-03-20 01:58:40 +00:00
Eric Christopher 86af0bae8a Add a newline at the end of the file.
llvm-svn: 99026
2010-03-20 01:19:04 +00:00
Eric Christopher 6ed351ab2d For legacy compatibility add a varargs.h header.
llvm-svn: 99025
2010-03-20 01:18:30 +00:00
Ted Kremenek 8a8e3e61aa Augment path diagnostics to include displaying when a message expression
is not evaluated because the receiver is nil.

llvm-svn: 99024
2010-03-20 01:17:30 +00:00