Evan Cheng
9edd616b59
Fix PR3666: isel calls to constant addresses.
...
llvm-svn: 66024
2009-03-04 06:48:53 +00:00
Chris Lattner
9631e1871e
Switch attributes to be allocated from the declcontext bump pointer just like
...
decls. This reduces the number of calls to malloc on cocoa.h with pth and
-disable-free from 15958 to 12444 times (down ~3500).
llvm-svn: 66023
2009-03-04 06:34:08 +00:00
Zhongxing Xu
7d41c616f1
Adjust indentation.
...
llvm-svn: 66022
2009-03-04 06:33:38 +00:00
Eli Friedman
7604d37723
PR3686: make the legalizer handle bitcast from i80 to x86 long double.
...
llvm-svn: 66021
2009-03-04 06:23:34 +00:00
Chris Lattner
9a2d50e7fd
add an a Attr::Destroy method and force clients to go through it. As part of
...
this, make DeclBase::Destroy destroy attributes instead of the DeclBase dtor.
llvm-svn: 66020
2009-03-04 06:05:19 +00:00
Eli Friedman
f22fa28522
Make this test a bit more specific about the target so that it passes on
...
Linux.
llvm-svn: 66019
2009-03-04 06:00:10 +00:00
Eli Friedman
e0a5b8b11f
Minor cleanup for choose expressions: add a helper that returns the
...
chosen sub-expression, rather than just evaluating the condition.
llvm-svn: 66018
2009-03-04 05:52:32 +00:00
Chris Lattner
1a84994c46
allocate MultiKeywordSelector's out of a bump pointer allocator instead of malloc.
...
This has two advantages 1) no more leaking them, 2) fewer calls to malloc.
This changes us from calling malloc 3685/1390/883/2974/1185 times respectively on
16/20/24/28/32 byte objects when parsing cocoa.h with pth and -disable-free to
calling it 2816/1020/702/2903/1168 times each respectively.
llvm-svn: 66017
2009-03-04 05:35:38 +00:00
Chris Lattner
7b26b29351
simplify Sema::AddInstanceMethodToGlobalPool, no functionality change.
...
llvm-svn: 66016
2009-03-04 05:16:45 +00:00
Chris Lattner
4192bce91b
add a special case for codegen that improves the case where we have
...
multiple sequential cases to a) not create tons of fall-through basic blocks
and b) not recurse deeply. This fixes codegen on 100K deep cases, and improves
codegen on moderate cases from this:
switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb1
i32 1002, label %sw.bb2
i32 1003, label %sw.bb3
i32 1004, label %sw.bb4
...
sw.bb: ; preds = %entry
br label %sw.bb1
sw.bb1: ; preds = %entry, %sw.bb
br label %sw.bb2
sw.bb2: ; preds = %entry, %sw.bb1
br label %sw.bb3
sw.bb3: ; preds = %entry, %sw.bb2
br label %sw.bb4
to:
switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb
i32 1002, label %sw.bb
i32 1003, label %sw.bb
i32 1004, label %sw.bb
sw.bb: ;; many preds
llvm-svn: 66015
2009-03-04 04:46:18 +00:00
Chris Lattner
9bbf1ba1e6
fix infinite recursion
...
llvm-svn: 66014
2009-03-04 04:30:02 +00:00
Chris Lattner
e46f6e7d9c
make CaseStmt::getSourceRange() iterative for deeply
...
nested cases instead of recursive.
llvm-svn: 66013
2009-03-04 04:26:45 +00:00
Eli Friedman
3efa41a478
Continuation of PR3687: fix more places to use the right type for
...
booleans.
llvm-svn: 66012
2009-03-04 04:25:14 +00:00
Chris Lattner
34a2209177
Change Parser::ParseCaseStatement to use an iterative approach to parsing
...
multiple sequential case statements instead of doing it with recursion. This
fixes a problem where we run out of stack space parsing 100K directly nested
cases.
There are a couple other problems that prevent this from being useful in
practice (right now the example only parses correctly with -disable-free and
doesn't work with -emit-llvm), but this is a start.
I'm not including a testcase because it is large and uninteresting for
regtesting.
Sebastian, I would appreciate it if you could scrutinize the smart pointer
gymnastics I do.
llvm-svn: 66011
2009-03-04 04:23:07 +00:00
Eli Friedman
a1493b3b4d
Comment fix: change a question to an answer.
...
llvm-svn: 66010
2009-03-04 04:22:58 +00:00
Eli Friedman
42d2a3add6
Attempt to fix PR3709: when converting from an integer to a pointer,
...
first extend the integer to the correct width.
llvm-svn: 66009
2009-03-04 04:02:35 +00:00
Dan Gohman
6728f892be
Revert r66004 for now; it's causing a variety of test failures.
...
llvm-svn: 66008
2009-03-04 03:54:19 +00:00
Mike Stump
97d01d50d9
Improved ABI compliance for __block variables. No testcases yet as we
...
still give an unsupported error for them due to the fact this is a
work in progress.
llvm-svn: 66007
2009-03-04 03:23:46 +00:00
Evan Cheng
e08f4cb9a1
Rename test.
...
llvm-svn: 66006
2009-03-04 02:47:25 +00:00
Ted Kremenek
d275bf3c54
Added the notion of a "boundable region", which is a region that can have a direct binding in the StoreManager.
...
llvm-svn: 66005
2009-03-04 02:43:08 +00:00
Dan Gohman
fe8d71f42a
Teach the x86 backend to eliminate "test" instructions by using the EFLAGS
...
result from add, sub, inc, and dec instructions in simple cases.
llvm-svn: 66004
2009-03-04 02:33:24 +00:00
Daniel Dunbar
14a41c5e98
Add some more FIXME's about bits we could pack better.
...
llvm-svn: 66003
2009-03-04 02:27:50 +00:00
Daniel Dunbar
47076e7155
Woot, save 8 bytes in Decl on 64-bit by reordering fields. This
...
reduces allocated Decl size by ~8% on Cocoa.h (~700k).
llvm-svn: 66002
2009-03-04 02:26:41 +00:00
Dale Johannesen
845e582cbe
Revert unintended commmit.
...
llvm-svn: 66001
2009-03-04 02:09:48 +00:00
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