Commit Graph

55475 Commits

Author SHA1 Message Date
Dale Johannesen d71c20081c Skip ptr-to-ptr bitcasts when counting in another case.
llvm-svn: 66000
2009-03-04 02:06:53 +00:00
Dale Johannesen c8b5a6ef7d Always skip ptr-to-ptr bitcasts when counting,
per Chris' suggestion.  Slightly faster.

llvm-svn: 65999
2009-03-04 01:53:05 +00:00
Evan Cheng b8905c4e2c Fix PR3701. 1. X86 target renamed eflags register to flags. This matches what llvm-gcc generates so codegen knows flags register is being clobbered by inline asm. 2. BURR scheduler should also check if inline asm nodes can clobber "live" physical registers. Previously it was only checking target nodes with implicit defs.
llvm-svn: 65996
2009-03-04 01:41:49 +00:00
Devang Patel 812459613b If a global constant is dead then global's debug info should not prevent the optimizer in deleting the global. And while deleting global, delete global's debug info also.
llvm-svn: 65994
2009-03-04 01:22:23 +00:00
Dale Johannesen 0365d3b8b5 Make my earlier patch to skip debug intrinsics
when counting work; it was only off by 1.

llvm-svn: 65993
2009-03-04 01:20:34 +00:00
Dale Johannesen 159d2159ee Temporarily revert 65975, which breaks the llvm-gcc build.
While the patch is clearly correct in itself, it's become
apparent other places are assuming debug intrinsics are
marked as touching memory...this needs more testing.

llvm-svn: 65992
2009-03-04 01:14:28 +00:00
Ted Kremenek d69e29e8c4 This test now passes using RegionStore.
llvm-svn: 65988
2009-03-04 00:23:28 +00:00
Ted Kremenek 52170722ec RegionStore: Handle implicit parameters.
llvm-svn: 65987
2009-03-04 00:23:05 +00:00
Bill Wendling 6d2714738f The DAG combiner was performing a BT combine. The BT combine had a value of -1,
so it changed it into a 31 via the TLO.ShrinkDemandedConstant() call. Then it
would go through the DAG combiner again. This time it had a value of 31, which
was turned into a -1 by TLI.SimplifyDemandedBits(). This would ping pong
forever.

Teach the TLO.ShrinkDemandedConstant() call not to lower a value if the demanded
value is an XOR of all ones.

llvm-svn: 65985
2009-03-04 00:18:06 +00:00
Ted Kremenek 74a2d0f8ca Create "TypedViewRegions" that layer on top of SymbolicRegions when handling
pointer-to-pointer casts involving symbolic locations.

llvm-svn: 65984
2009-03-04 00:14:35 +00:00
Ted Kremenek 804fc236a7 Use GetSValAsScalarOrLoc instead of GetSVal to prevent unintended structure or array "loads".
llvm-svn: 65983
2009-03-04 00:13:50 +00:00
Ted Kremenek 19df925f6b Add "GetSValAsScalarOrLoc" methods to GRState/GRStateRef that only perform a
retrieval from the store/environment for locations or scalar types.

llvm-svn: 65982
2009-03-04 00:13:10 +00:00
Ted Kremenek 67c710e2c8 RegionStore::RemoveDeadBindings needs to check all the symbols of the super region of a scanned region as well.
llvm-svn: 65981
2009-03-04 00:11:38 +00:00
Daniel Dunbar 817b7692fb Add new performance numbers; no discussion yet. Obvious two
conclusions are our PCH generation is way faster than gcc, and the
Python based driver kills compile times.

llvm-svn: 65980
2009-03-04 00:04:28 +00:00
Dale Johannesen 738c60f259 Marking debug info intrinsics as not touching memory
caused them to be considered trivially dead.  Fix this.

llvm-svn: 65979
2009-03-03 23:30:00 +00:00
Steve Naroff 013813dd5d Change a warning to an error...
llvm-svn: 65978
2009-03-03 23:13:51 +00:00
Dale Johannesen 09c3e8ec00 Instruction counters must skip the bitcasts that
feed into llvm.dbg.declare nodes, as well as
the debug directives themselves.

llvm-svn: 65976
2009-03-03 22:36:47 +00:00
Devang Patel 8720a0b9a7 Dbg Intrinsics do not access memory.
llvm-svn: 65975
2009-03-03 22:33:54 +00:00
Fariborz Jahanian 9a8e759b4f Implement an important missing warning when a selector
is searched for in the global pool. It already uncovered 
a clang bug in message selection.

llvm-svn: 65974
2009-03-03 22:19:15 +00:00
Steve Naroff c03f6b91b1 Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.
llvm-svn: 65973
2009-03-03 22:09:41 +00:00
Ted Kremenek c9747dd60f Rework use of loc::SymbolVal in the retain/release checker to use the new method
SVal::getAsLocSymbol(). This simplifies the code and allows the retain/release
checker to (I believe) also correctly reason about location symbols wrapped in
SymbolicRegions.

Along the way I cleaned up SymbolRef a little, disallowing implicit casts to
'unsigned'.

llvm-svn: 65972
2009-03-03 22:06:47 +00:00
Devang Patel b833ce74d8 Recursively remove dead argument while removing llvm.dbg.declare intrinsic.
llvm-svn: 65971
2009-03-03 21:31:02 +00:00
Dale Johannesen 77456b7ab4 When removing a store to an alloca that has only one
use, check also for the case where it has two uses,
the other being a llvm.dbg.declare.  This is needed so
debug info doesn't affect codegen.

llvm-svn: 65970
2009-03-03 21:26:39 +00:00
Steve Naroff 27ed6f6766 Fix <rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements.
llvm-svn: 65969
2009-03-03 21:16:54 +00:00
Steve Naroff 39d6fba0d6 Fix <rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements.
llvm-svn: 65968
2009-03-03 20:59:06 +00:00
Chris Lattner 7956bba545 don't #include a header into the middle of an anon namespace.
llvm-svn: 65967
2009-03-03 20:10:23 +00:00
Chris Lattner 5c3529634a implement support for propagating *features* down to the code generator
and defining target-specific macros based on them (like __SSE3__ and 
friends).  After extensive discussion with Daniel, this work will need
driver support, which will translate things like -msse3 into a -mattr 
feature.  Until this work is done, the code in clang.cpp is disabled and
the X86TargetInfo ctor still defaults to SSE2.  With these two things
changed, this code will work.  PR3634

llvm-svn: 65966
2009-03-03 19:56:18 +00:00
Dan Gohman 3a72265d41 Add '(implicit EFLAGS)' for AND, OR, XOR, NEG, INC, and DEC
instructions. These aren't used yet.

llvm-svn: 65965
2009-03-03 19:53:46 +00:00
Steve Naroff 371b8fb4c3 Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).
Also necessary to fix:

<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements

llvm-svn: 65964
2009-03-03 19:52:17 +00:00
Bob Wilson 530e038940 Use early exit to reduce indentation. No functional change.
llvm-svn: 65962
2009-03-03 19:26:27 +00:00
Bill Wendling 7fcd6148f7 Remove accidental check-ins in r65960. :-(
llvm-svn: 65961
2009-03-03 19:25:16 +00:00
Bill Wendling a68fc7af63 Use > instead of >=. We want to promote aggregates of 128-bytes.
llvm-svn: 65960
2009-03-03 19:18:49 +00:00
Ted Kremenek 9f276d6279 Don't use std::auto_ptr with getSubRegionMap().
llvm-svn: 65957
2009-03-03 19:02:42 +00:00
Ted Kremenek e3852bd252 Fix case where we should use dyn_cast instead of cast.
llvm-svn: 65956
2009-03-03 19:01:37 +00:00
Fariborz Jahanian eab5ecd8e0 Fixed an ir-gen bug in syntheszing a getter function
with property type which does not match its ivar and
in -fobjc-gc-only mode!

llvm-svn: 65955
2009-03-03 18:49:40 +00:00
Ted Kremenek 5340b248b4 Fix extra ';' bug noticed by Mike Stump.
llvm-svn: 65954
2009-03-03 18:15:30 +00:00
Dan Gohman 9a8a28da99 Make a comment less terse.
llvm-svn: 65953
2009-03-03 17:44:54 +00:00
Daniel Dunbar cabb41d15a Hush gcc.
llvm-svn: 65952
2009-03-03 16:54:38 +00:00
Anders Carlsson 24b1447b19 Return 0 if the ConstExprEmitter can't handle an expression.
llvm-svn: 65951
2009-03-03 16:43:34 +00:00
Steve Naroff b0e25c1ceb Remove old/incorrect warnings.
llvm-svn: 65950
2009-03-03 15:49:23 +00:00
Steve Naroff 3e1181e2e9 Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work.
Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict).

llvm-svn: 65949
2009-03-03 15:43:24 +00:00
Steve Naroff 157599fe1c Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation.
llvm-svn: 65948
2009-03-03 14:49:36 +00:00
Bill Wendling 3e44bf3c4b Reapply r65755, but reversing "<" to ">=".
llvm-svn: 65945
2009-03-03 12:12:58 +00:00
Mikhail Glushenkov 33435e49a9 Add example/Skeleton.
This is a template that can be used to build your own LLVMC-based drivers.
It can be also useful as a "bare-bones" LLVMC.

llvm-svn: 65944
2009-03-03 11:02:48 +00:00
Mikhail Glushenkov b5f56fc268 Comment fixes.
llvm-svn: 65943
2009-03-03 10:04:57 +00:00
Mikhail Glushenkov 59a5afa996 Oops.
llvm-svn: 65942
2009-03-03 10:04:23 +00:00
Mikhail Glushenkov 4f85b86120 Use LLVMLIBS instead of USEDLIBS.
Since this Makefile is supposed to be usable from LLVM-based projects not in the
tree, LLVMLIBS should be used instead of USEDLIBS. This depends on my previous
fix to Makefile.rules.

llvm-svn: 65941
2009-03-03 10:03:53 +00:00
Mikhail Glushenkov ab6f8ded33 LINK_COMPONENTS should be added to LLVMLibsOptions.
From the code: "There are "Proj" libs (defined by the user's project) and "LLVM"
libs (defined by the LLVM project)." LINK_COMPONENTS are clearly defined by the
LLVM project.

Additionally, this fixes an issue with llvmc's build process:-)

llvm-svn: 65940
2009-03-03 10:03:27 +00:00
Mikhail Glushenkov b00b964697 Move example plugins to the example/ directory.
llvm-svn: 65939
2009-03-03 10:02:53 +00:00
Nick Lewycky 9e26e6d3cb ENABLE_PIC is either 0 or 1, but is always defined.
llvm-svn: 65938
2009-03-03 07:45:09 +00:00