Commit Graph

48938 Commits

Author SHA1 Message Date
Daniel Dunbar 969e35610d ccc: Pass '-g' through to clang. Handle -weak_framework.
llvm-svn: 57779
2008-10-19 02:41:16 +00:00
Daniel Dunbar 70e3ebafdb Improve attribute parsing & tests.
- Support noreturn on function-typed variables.

 - Extend isFunctionOrMethod to return true for K&R functions and
   provide hasFunctionProto to check if a decl has information about
   its arguments. This code needs some serious cleaning, but works.

 - Add/improve test cases for noreturn and unused.

llvm-svn: 57778
2008-10-19 02:04:16 +00:00
Ted Kremenek f8d65a30d6 Add support in GRExprEngine for UnaryOperator::AlignOf. This fixes one crash report in PR 2796.
llvm-svn: 57777
2008-10-18 22:20:20 +00:00
Ted Kremenek cfb049c832 Updated checker build
llvm-svn: 57775
2008-10-18 21:03:40 +00:00
Ted Kremenek d36e552245 Fix incorrect release of Decl* array referenced by DeclGroup.
Patch by Timo Sirainen!

llvm-svn: 57772
2008-10-18 19:20:54 +00:00
Chris Lattner 160e8abd77 Reapply r57699 with a fix to not crash on asms with multiple results. Unlike
the previous patch this one actually passes make check.

"Fix PR2356 on PowerPC: if we have an input and output that are tied together
that have different sizes (e.g. i32 and i64) make sure to reserve registers for
the bigger operand."

llvm-svn: 57771
2008-10-18 18:49:30 +00:00
Dan Gohman 727a94063c Don't truncate GlobalAddress offsets to int in debug output.
llvm-svn: 57770
2008-10-18 18:22:42 +00:00
Daniel Dunbar 354d278518 Debug info bug fix, function start wasn't getting generated correctly
for Obj-C methods.

llvm-svn: 57769
2008-10-18 18:22:23 +00:00
Evan Cheng 2dadd3bbc6 By min, I mean max.
llvm-svn: 57766
2008-10-18 05:21:37 +00:00
Evan Cheng ac4e70d946 When creating intervals, leave min(1, numdefs) holes after each instruction.
llvm-svn: 57765
2008-10-18 05:18:55 +00:00
Ted Kremenek 43a9d7f3f0 Updated checker build.
llvm-svn: 57764
2008-10-18 05:12:17 +00:00
Ted Kremenek 850422e5d2 Generalize VisitLValue: not only can CallExprs and ObjCMessageExprs return aggregate temporaries, so can many other expressions.
llvm-svn: 57761
2008-10-18 04:15:35 +00:00
Ted Kremenek 8f5dc295ce Function calls and ObjC message expressions can be used in a lvalue context if they return a structure. E.g foo().x == 1. We don't really support, however, such temporaries yet in the environment or the store.
llvm-svn: 57760
2008-10-18 04:08:49 +00:00
Ted Kremenek e86755e14f retain/release checker: Check if a tracked value escapes if we also try binding it to the store and the store doesn't support that binding (i.e., it cannot track it). This has the nice feature that the checker will automatically get more powerful if we use a more powerful store model.
llvm-svn: 57755
2008-10-18 03:49:51 +00:00
Ted Kremenek fef1f30ea2 Use "VisitLValue" when processing the base for "x.f" field accesses, and "Visit" when processing the base for "x->f" field accesses.
llvm-svn: 57754
2008-10-18 03:28:48 +00:00
Mon P Wang 8f477106a4 Make llvm memory barrier available as an intrinsic
llvm-svn: 57751
2008-10-18 02:49:28 +00:00
Mon P Wang 446218462b Make llvm memory barrier available as an intrinsic
llvm-svn: 57750
2008-10-18 02:48:13 +00:00
Mon P Wang 179a72f000 Added vec_set intrinsics
llvm-svn: 57749
2008-10-18 02:43:25 +00:00
Dan Gohman 2fe6bee5b6 Teach DAGCombine to fold constant offsets into GlobalAddress nodes,
and add a TargetLowering hook for it to use to determine when this
is legal (i.e. not in PIC mode, etc.)

This allows instruction selection to emit folded constant offsets
in more cases, such as the included testcase, eliminating the need
for explicit arithmetic instructions.

This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp
that attempted to achieve the same effect, but wasn't as effective.

Also, fix handling of offsets in GlobalAddressSDNodes in several
places, including changing GlobalAddressSDNode's offset from
int to int64_t.

The Mips, Alpha, Sparc, and CellSPU targets appear to be
unaware of GlobalAddress offsets currently, so set the hook to
false on those targets.

llvm-svn: 57748
2008-10-18 02:06:02 +00:00
Dan Gohman 6de2556205 Revert r57699. It's causing regressions in
test/CodeGen/X86/2008-09-17-inline-asm-1.ll
and a few others, and it breaks the llvm-gcc build.

llvm-svn: 57747
2008-10-18 01:03:45 +00:00
Argyrios Kyrtzidis 3a0558af9a Just do a diagIfAmbiguous -> warnIfAmbiguous rename.
No functionality change.

llvm-svn: 57746
2008-10-17 23:23:35 +00:00
Daniel Dunbar 1ea1aa2cc1 Emit more descriptive unsupported error message on dot-syntax use of super.
llvm-svn: 57745
2008-10-17 23:05:02 +00:00
Daniel Dunbar 6ccea71c64 Add some uses of PredefinedExpr to language coverage includes.
llvm-svn: 57744
2008-10-17 23:04:32 +00:00
Daniel Dunbar cf56c2b7bd Add FIXME about potential problem in how property ref lvalues are handled.
llvm-svn: 57743
2008-10-17 23:02:24 +00:00
Ted Kremenek 0b09ea54ba This test now passes again.
llvm-svn: 57742
2008-10-17 22:53:09 +00:00
Ted Kremenek db5ae0aa1c Hack: have BasicStore::getLValueElement return the "Base" lvalue. This restores null dereference checking with array accesses.
BasicStore::RemoveDeadBindings: handle regions besides VarRegions (we now have FieldRegions).

llvm-svn: 57741
2008-10-17 22:52:40 +00:00
Ted Kremenek 213873232d When conjuring symbols to recover path-sensitivity, don't conjure symbols that represent an entire struct. We need to implement struct temporaries as an actual "region", and then bind symbols to the FieldRegion of those temporaries.
llvm-svn: 57739
2008-10-17 22:23:12 +00:00
Daniel Dunbar b35174727f Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.
- Shouldn't assume predefined expr is a function printing one.
 - Uses CGM functionality to cache function names per module.

llvm-svn: 57737
2008-10-17 21:58:32 +00:00
Daniel Dunbar dfcf599dfa Add option argument to GetAddrOfConstantString to use for name of
(first) global holding the string.
 - No functionality change.

llvm-svn: 57736
2008-10-17 21:56:50 +00:00
Dan Gohman 83876cd9b0 Use the opcode predicates, instead of duplicating the code.
llvm-svn: 57735
2008-10-17 21:42:45 +00:00
Dan Gohman 209fc26462 This is now partly done.
llvm-svn: 57734
2008-10-17 21:39:27 +00:00
Dan Gohman b1d8d6ecff This is done.
llvm-svn: 57733
2008-10-17 21:38:40 +00:00
Chris Lattner f0a5f84c42 fix rdar://6288301: custom warnings don't respect -Werror.
llvm-svn: 57731
2008-10-17 21:24:47 +00:00
Ted Kremenek 1416a521b5 Enhance "Assumption" logic in BasicConstraintManager when reasoning about regions and symbolic regions. When assuming whether or not a location is non-null, walk up the region hierarchy until we hit a symbolic region (and test it for null). This may not be the end all solution, as the notion of what a "symbolic region" is really belongs in the specific subclass of StoreManager.
llvm-svn: 57730
2008-10-17 21:22:20 +00:00
Dan Gohman d01ddb51ee Factor out the code for mapping LLVM IR condition opcodes to
ISD condition opcodes into helper functions.

llvm-svn: 57726
2008-10-17 21:16:08 +00:00
Ted Kremenek fe15bedff4 Add pretty-printing support for FieldRegions.
llvm-svn: 57724
2008-10-17 21:05:44 +00:00
Evan Cheng 0fcc89b596 Add implicit defs of XMM8 to XMM15 on 32-bit call instructions. While this is not technically true, it tells tblgen that these instructions "clobber" the entire XMM register file.
llvm-svn: 57723
2008-10-17 21:02:22 +00:00
Evan Cheng 010e9b0760 Add RCBarriers to TargetInstrDesc. It's a list of register classes the given instruction can "clobber". For example, on x86 the call instruction can modify all of the XMM and fp stack registers.
TableGen has been taught to generate the lists from instruction definitions.

llvm-svn: 57722
2008-10-17 21:00:09 +00:00
Daniel Dunbar 1e75408d89 Emit error unsupported when asm string conversion fails instead of
assert.

llvm-svn: 57721
2008-10-17 20:58:01 +00:00
Evan Cheng 94169f1021 Fix PR2898. Spiller delete a store for reuse before it knows for sure the reuse happened.
Patch by Lang Hames!

llvm-svn: 57720
2008-10-17 20:56:41 +00:00
Ted Kremenek a196618ad0 Fixed an elusive caching bug in ExplodedGraph construction when a PostStmtKind was used instead of a PostStoreKind.
llvm-svn: 57719
2008-10-17 20:49:23 +00:00
Ted Kremenek 055891cbf3 Test now passes.
llvm-svn: 57718
2008-10-17 20:29:05 +00:00
Ted Kremenek 8b103c65c6 - constify some uses of MemRegion* (MemRegion should be immutable).
- Added new region "SymbolicRegion", which maps symbol values to the region domain.
- Enhanced BasicStore::getFieldLValue() to return a FieldRegion (using SymbolicRegion)
- Added some utility methods to GRState for fetch svals from the store.
- Fixed regression in CheckNSError (we weren't getting the value bound to the parameter)

llvm-svn: 57717
2008-10-17 20:28:54 +00:00
Daniel Dunbar fc1066db81 Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.
llvm-svn: 57716
2008-10-17 20:21:44 +00:00
Chris Lattner aadf7414b2 add support for 128 bit aggregates.
llvm-svn: 57715
2008-10-17 19:59:51 +00:00
Bill Wendling fe9e2c587d The Dwarf writer was comparing mangled and unmangled names for C++ code when we
have an unreachable block in a function. This was triggering the assert. This is
a horrid hack to cover this up.

Oh! for a good debug info architecture!

llvm-svn: 57714
2008-10-17 18:48:57 +00:00
Mon P Wang 85f48ade9c Added MemIntrinsicNode which is useful to represent target intrinsics that
touches memory and need an associated MemOperand

llvm-svn: 57712
2008-10-17 18:22:58 +00:00
Dan Gohman 293abcc91d Factor out the code for mapping LLVM IR condition opcodes to
ISD condition opcodes into helper functions.

llvm-svn: 57710
2008-10-17 18:18:45 +00:00
Chris Lattner 8e2ef196ae add support for 128 bit inputs on both x86-64 and x86-32.
llvm-svn: 57709
2008-10-17 18:15:05 +00:00
Chris Lattner c7e65f4377 Fix a bug where the x86 backend would reject 64-bit r constraints when
in 32-bit mode instead of assigning a register pair.  This has nothing to
do with PR2356, but I happened to notice it while working on it.

llvm-svn: 57704
2008-10-17 17:59:52 +00:00