Commit Graph

68601 Commits

Author SHA1 Message Date
Chris Lattner 6d98ede7e8 wpa is an experiment, don't build it by default, it adds to build times due to everything it links in.
llvm-svn: 82704
2009-09-24 19:45:12 +00:00
Anders Carlsson d934010557 Add a -dump-record-layouts argument to clang-cc.
llvm-svn: 82703
2009-09-24 18:54:49 +00:00
Ted Kremenek 0868eea3f0 When building CFGs, no longer reverse the statements in the CFGBlock. Instead
have the iterators and operator[] handle the traversal of statements, as they
are stored in reverse order. Tests show this has no real performance impact, but
it does simply the CFG construction logic and will make it slightly easier to
change the allocation strategy for CFGBlocks (as we have fewer copies).

llvm-svn: 82702
2009-09-24 18:45:41 +00:00
Dale Johannesen 68f971b1d6 Clarify that llvm attaches C language semantics to
functions with names that match the C library.

llvm-svn: 82701
2009-09-24 18:38:21 +00:00
Torok Edwin 21bd8c9fc5 Constant propagating byval pointer is safe if function is readonly.
llvm-svn: 82700
2009-09-24 18:33:42 +00:00
Victor Hernandez 46cd467310 Auto-upgrade malloc instructions to malloc calls.
Reviewed by Devang Patel.

llvm-svn: 82694
2009-09-24 17:47:49 +00:00
Bob Wilson 5fe313d6e0 Fix a hypothetical problem for targets with StackGrowsUp and a non-zero
LocalAreaOffset.  (We don't have any of those right now.)
PEI::calculateFrameObjectOffsets includes the absolute value of the
LocalAreaOffset in the cumulative offset value used to calculate the
stack frame size.  It then adds the raw value of the LocalAreaOffset
to the stack size.  For a StackGrowsDown target, that raw value is negative
and has the effect of cancelling out the absolute value that was added
earlier, but that obviously won't work for a StackGrowsUp target.  Change
to subtract the absolute value of the LocalAreaOffset.

llvm-svn: 82693
2009-09-24 16:42:27 +00:00
Devang Patel 4e6f2e46e8 Move parent assertion check before metadata deletion.
llvm-svn: 82692
2009-09-24 16:19:11 +00:00
Torok Edwin f95a450ef9 Don't constant propagate byval pointers, since they are not really pointers, but
rather structs passed by value.
This fixes PR5038.

llvm-svn: 82689
2009-09-24 09:47:18 +00:00
Daniel Dunbar a5840dbcb5 cmake: Run tests with 'verbose' enabled by default, so that the failure is
visible in the log.

llvm-svn: 82688
2009-09-24 07:18:36 +00:00
Daniel Dunbar c437eb831b We no longer need anything from the llvm/test/Scripts dir.
llvm-svn: 82687
2009-09-24 06:31:08 +00:00
Ted Kremenek 1b40e5978f Fix crash in RegionStoreManager::Bind() by using 'getAs<PointerType>()' instead of 'cast<PointerType>()' (to handle pointer typedefs).
llvm-svn: 82686
2009-09-24 06:24:32 +00:00
Daniel Dunbar 00dd448cff Add count/not tools as executables.
- Apparently, I'm willing to do incredibly stupid things in the name of portability.

llvm-svn: 82685
2009-09-24 06:23:57 +00:00
Chris Lattner 87d8f2b9d5 unconditionally compute MMI even if the target doesn't support EH or Debug info, because the target may use it for other things, this fixes PR5036
llvm-svn: 82684
2009-09-24 05:44:53 +00:00
Chris Lattner 4e37f877b5 reapply r82348 with a fix, thanks Jeffrey.
llvm-svn: 82683
2009-09-24 05:38:36 +00:00
Anders Carlsson bb66bc8e84 More improvements with laying out empty bases.
llvm-svn: 82682
2009-09-24 05:21:31 +00:00
Daniel Dunbar b3b1e53d33 Darwin/x86-32: Enumerated types and block pointer types in structures were not
handled correctly.
 - <rdar://problem/7247671> Function arguments incorrect when function returns a
   struct on i386 w/ llvm-g++ and clang

llvm-svn: 82681
2009-09-24 05:12:36 +00:00
Ted Kremenek 267e45adab Fix: <rdar://problem/7249340> [RegionStore] model stores to symbolic parameter regions
The issue was a discrepancy between how RegionStoreManager::Bind() and
RegionStoreManager::Retrieve() derived the "key" for the first element
of a symbolic region.

llvm-svn: 82680
2009-09-24 04:11:44 +00:00
Anders Carlsson f24b18fb06 More work on empty classes.
llvm-svn: 82679
2009-09-24 03:22:10 +00:00
Anders Carlsson 6522b05db7 Scaffolding for supporting empty bases/fields.
llvm-svn: 82678
2009-09-24 03:13:30 +00:00
Evan Cheng 26ea28eb5f Fix PR5024 with a big hammer: disable the double-def assertion in the scavenger.
LiveVariables add implicit kills to correctly track partial register kills. This works well enough and is fairly accurate. But coalescer can make it impossible to maintain these markers. e.g.

        BL <ga:sss1>, %R0<kill,undef>, %S0<kill>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def>, ...
...
	%reg1031<def> = FLDS <cp#1>, 0, 14, %reg0, Mem:LD4[ConstantPool]
...
   	%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>

When reg1031 and S0 are coalesced, the copy (FCPYS) will be eliminated the the implicit-kill of D0 is lost. In this case it's possible to move the marker to the FLDS. But in many cases, this is not possible. Suppose

	%reg1031<def> = FOO <cp#1>, %D0<imp-def>
...
   	%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>

When FCPYS goes away, the definition of S0 is the "FOO" instruction. However, transferring the D0 implicit-kill to FOO doesn't work since it is the def of D0 itself. We need to fix this in another time by introducing a "kill" pseudo instruction to track liveness.

Disabling the assertion is not ideal, but machine verifier is doing that job now. It's important to know double-def is not a miscomputation since it means a register should be free but it's not tracked as free. It's a performance issue instead.

llvm-svn: 82677
2009-09-24 02:27:09 +00:00
Evan Cheng a21aac3811 Clean up LiveVariables and change how it deals with partial updates and kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate.
llvm-svn: 82676
2009-09-24 02:15:22 +00:00
Jeffrey Yasskin a75d6bf3a8 Roll back r82348, which introduced an infinite loop in ParseCStringVector() that
a trivial unittest would have caught.  This revision also adds the trivial
unittest.

llvm-svn: 82675
2009-09-24 01:14:07 +00:00
Ted Kremenek d9120d3575 Shorten the static analyzer diagnostic for 'use of garbage value'.
llvm-svn: 82672
2009-09-24 00:44:26 +00:00
Fariborz Jahanian 20327b0422 Use Doug's DeclLoc to pinpoint location of the declaration
in a reference initialization diagnostic.

llvm-svn: 82671
2009-09-24 00:42:43 +00:00
Douglas Gregor c809cc2efa Improve diagnostic location information when checking the initialization of a reference
llvm-svn: 82666
2009-09-23 23:04:10 +00:00
Douglas Gregor 96ab942a69 Make C++ temporary-related expressions provide proper source-range information.
llvm-svn: 82665
2009-09-23 22:51:26 +00:00
Fariborz Jahanian 9ce90d13e3 patch to ir-gen conversion function call used in
initializing a reference class.

llvm-svn: 82664
2009-09-23 22:34:00 +00:00
Douglas Gregor e412a5a8f7 For code completion, note that injected-class-names found as part of
lookup in a member access expression always start a
nested-name-specifier. Additionally, rank names that start
nested-name-specifiers after other names.

llvm-svn: 82663
2009-09-23 22:26:46 +00:00
Dale Johannesen fb1b55bc9c A minor improvment in accuracy to inline cost
computation, and some cosmetics.

llvm-svn: 82660
2009-09-23 22:05:24 +00:00
Dale Johannesen ea406ed0a6 Disable test; what it's testing for is wrong.
llvm-svn: 82658
2009-09-23 21:46:36 +00:00
David Goodwin afcaf79603 Checkpoint NEON scheduling itineraries.
llvm-svn: 82657
2009-09-23 21:38:08 +00:00
Dan Gohman 203d53ed79 Use getStoreSize() instead of getStoreSizeInBits()/8.
llvm-svn: 82656
2009-09-23 21:07:02 +00:00
Dan Gohman 99bdae2992 Spruce up some comments.
llvm-svn: 82655
2009-09-23 21:06:36 +00:00
Dan Gohman 08c0a95ac6 Rename several variables from EVT to more descriptive names, now that EVT
is also the name of their type, as declarations like "EVT EVT" look
really odd.

llvm-svn: 82654
2009-09-23 21:02:20 +00:00
Dan Gohman 2366ffd2cb Add an EVT::getStoreSize function, like getStoreSizeInBits but in bytes.
llvm-svn: 82653
2009-09-23 20:59:10 +00:00
Jakob Stoklund Olesen 75b9c2741d Fix verification of explicit operands.
The machine code verifier did not check for explicit operands correctly. It
used MachineInstr::getNumExplicitOperands, but that method may cheat and use
the declared count in the TargetInstrDesc.

Now we check the explicit operands one at a time in visitMachineOperand.

llvm-svn: 82652
2009-09-23 20:57:55 +00:00
Bob Wilson abfdbbfd1a Remove BlackfinRegisterInfo::getFrameIndexOffset since it is the same as the
default implementation.  Update comment on the default version, which made it
sound like most targets override it.  Currently only X86 and SystemZ override
this method.

llvm-svn: 82651
2009-09-23 20:57:02 +00:00
Fariborz Jahanian 71130ca141 Remove the FIXME as I said.
llvm-svn: 82650
2009-09-23 20:56:34 +00:00
Fariborz Jahanian af0262dccf This patch addresses a few issues related to 8.5.3 [dcl.init.ref]
It uses a recent API to find inherited conversion functions to do
the initializer to reference lvalue conversion (and removes a FIXME).
It issues the ambiguity diagnostics when multiple conversions are found.
WIP.

llvm-svn: 82649
2009-09-23 20:55:32 +00:00
Dan Gohman 49f271afb3 Correct a comment.
llvm-svn: 82648
2009-09-23 20:40:16 +00:00
Devang Patel 52e819c7cf Delete attached metadata when an instruction is deleted.
llvm-svn: 82647
2009-09-23 20:33:51 +00:00
Steve Naroff f99203abd0 Some minor cleanups...
llvm-svn: 82646
2009-09-23 20:00:53 +00:00
Anders Carlsson 649a17e861 Handle namespace aliases.
llvm-svn: 82644
2009-09-23 19:19:16 +00:00
Anton Korobeynikov 29a44df5f8 ARM does not support offset folding (yet). Disable it for now.
This fixes PR5031. Unfortunately, there is no small testcase :(

llvm-svn: 82643
2009-09-23 19:04:09 +00:00
Anders Carlsson f771681e63 Emit new[] cookie when needed.
llvm-svn: 82642
2009-09-23 18:59:48 +00:00
Bob Wilson c2c86cede6 Edit a comment.
llvm-svn: 82641
2009-09-23 18:53:19 +00:00
Devang Patel add586526e Do not leave behind metadata while cloning an instruction.
llvm-svn: 82638
2009-09-23 18:32:25 +00:00
Evan Cheng 3cf0ddf094 Add nounwind.
llvm-svn: 82637
2009-09-23 18:20:27 +00:00
Steve Naroff 76b8f13fcb More work to enable more exhaustive testing of the indexing API.
Next step: Add actual some test cases:-)

llvm-svn: 82636
2009-09-23 17:52:52 +00:00