Commit Graph

80461 Commits

Author SHA1 Message Date
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
Daniel Dunbar ed45c3f2b9 Driver: Force joining of "-l" "foo", the linker doesn't eat that format.
<rdar://problem/7641151> clang must eat spaces after -l

llvm-svn: 99023
2010-03-20 01:12:03 +00:00
Daniel Dunbar 4ea3aea534 Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate option types.
Also, simplify/fix SeparateArg::render with forced join.

llvm-svn: 99022
2010-03-20 01:12:00 +00:00
Daniel Dunbar aef1db1d71 Fix unused variable warning.
llvm-svn: 99021
2010-03-20 01:11:56 +00:00
Eric Christopher 33124e20c7 Migrate typedefs to the top level of xmmintrin.h and remove the same
one from emmintrin.h.

llvm-svn: 99020
2010-03-20 01:08:47 +00:00
Eric Christopher 576a9f2508 Add include for smmintrin.h to this test.
llvm-svn: 99019
2010-03-20 01:06:48 +00:00
Daniel Dunbar 47d25b18db Driver: Fix possible crash when targetting an unknown (unsupported) Darwin
platform, e.g. ppc.

llvm-svn: 99016
2010-03-20 00:50:21 +00:00
Douglas Gregor 3dc10b530e Optimize region-of-interest based cursor walks through the
preprocessed entities by grouping preprocessed entities by file
ID. This drastically improves performance of repeated
clang_getCursor() calls local tests, although it is a bit ugly.

llvm-svn: 99015
2010-03-20 00:41:21 +00:00
Johnny Chen f833fad813 Add NLdStFrm Format.
llvm-svn: 99014
2010-03-20 00:17:00 +00:00
Johnny Chen 053e3510a3 Revert r98679. The disassembler will be updated to depend on the existence of
IndexModeUpd and then populates the Inst{21}=1 while populating the instructions
for disassembly.

llvm-svn: 99013
2010-03-19 23:50:27 +00:00
John McCall 7ec5043c2c Change CodeGenModule to rely on the Module's symbol table instead of
shadowing it in the GlobalDeclMap.  Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board.  We'll see how it plays out.

Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.

llvm-svn: 99012
2010-03-19 23:29:14 +00:00
Eric Christopher 3e2bb702db Revert r99009 temporarily it seems to be breaking the bots.
llvm-svn: 99011
2010-03-19 23:04:23 +00:00
Bob Wilson e4191e719b Revert this change, since it was causing ARM performance regressions.
--- Reverse-merging r98889 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMISelLowering.h
U    lib/Target/ARM/ARMInstrInfo.td
U    lib/Target/ARM/ARMInstrVFP.td
U    lib/Target/ARM/ARMISelLowering.cpp
U    lib/Target/ARM/ARMInstrFormats.td

llvm-svn: 99010
2010-03-19 22:51:32 +00:00
Chris Lattner 933b2cf9a8 Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy.

llvm-svn: 99009
2010-03-19 22:40:56 +00:00