Commit Graph

78510 Commits

Author SHA1 Message Date
Blaine Garst 5421a83e4a remove unused function & enumerations
llvm-svn: 96635
2010-02-19 00:24:37 +00:00
Jim Grosbach aa34003f6f Radar 7636153. In the presence of large call frames, it's not sufficient
for ARM to just check if a function has a FP to determine if it's safe
to simplify the stack adjustment pseudo ops prior to eliminating frame
indices. Allow targets to override the default behavior and does so for ARM
and Thumb2.

llvm-svn: 96634
2010-02-19 00:16:24 +00:00
Dan Gohman 2446f57503 When determining the set of interesting reuse factors, consider
strides in foreign loops. This helps locate reuse opportunities
with existing induction variables in foreign loops and reduces
the need for inserting new ones. This fixes rdar://7657764.

llvm-svn: 96629
2010-02-19 00:05:23 +00:00
Douglas Gregor 6cb5ba4c4f Teach ASTUnit to keep track of temporary files, then delete them when
the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.

llvm-svn: 96628
2010-02-18 23:35:40 +00:00
Dan Gohman 60b3326435 Indvars needs to explicitly notify ScalarEvolution when it is replacing
a loop exit value, so that if a loop gets deleted, ScalarEvolution
isn't stick holding on to dangling SCEVAddRecExprs for that loop. This
fixes PR6339.

llvm-svn: 96626
2010-02-18 23:26:33 +00:00
Douglas Gregor 1e21cc7d19 Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.

llvm-svn: 96624
2010-02-18 23:07:20 +00:00
Ted Kremenek 66f2d6ba7b Allow GNU attributes to appear in an Objective-C method declaration
before the selector name (but after the return type).  Among other things,
this allows IBAction to be implemented with an attribute.

llvm-svn: 96623
2010-02-18 23:05:16 +00:00
Ted Kremenek e21102523a Revert "Sort visitor methods so we can easily tell what's implemented."
This reverts commit 4383e04c75731f8695b8355783f9966ac56b0926.

llvm-svn: 96622
2010-02-18 22:36:18 +00:00
Mon P Wang c94892513d getSplatIndex assumes that the first element of the mask contains the splat index
which is not always true if the mask contains undefs. Modified it to return
the first non undef value.

llvm-svn: 96621
2010-02-18 22:33:18 +00:00
Ted Kremenek aaaf2bfffb Revert "Tidy up order of switch statement. No functionality change."
This reverts commit 95575005fc6409df98e6e079caf324308f62171b.

llvm-svn: 96620
2010-02-18 22:32:43 +00:00
Johnny Chen 688a90e2d7 Added LDRD_PRE/POST & STRD_PRE/POST for disassembly only.
llvm-svn: 96619
2010-02-18 22:31:18 +00:00
Douglas Gregor 9773e3d077 Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
breaking the msvc9 builder for unknown reasons.

llvm-svn: 96618
2010-02-18 22:27:07 +00:00
Chris Lattner 42a7ba7a67 add support for referencing registers and immediates,
building the tree to represent them but not emitting 
table entries for them yet.

llvm-svn: 96617
2010-02-18 22:03:03 +00:00
Talin 1feba3c980 replaceUsesOfWithOnConstant implementation for unions.
llvm-svn: 96616
2010-02-18 21:43:45 +00:00
Dan Gohman c43d264cc0 Hoist this loop-invariant logic out of the loop.
llvm-svn: 96614
2010-02-18 21:34:02 +00:00
Jakob Stoklund Olesen c953acbd7f Always normalize spill weights, also for intervals created by spilling.
Moderate the weight given to very small intervals.

The spill weight given to new intervals created when spilling was not
normalized in the same way as the original spill weights calculated by
CalcSpillWeights. That meant that restored registers would tend to hang around
because they had a much higher spill weight that unspilled registers.

This improves the runtime of a few tests by up to 10%, and there are no
significant regressions.

llvm-svn: 96613
2010-02-18 21:33:05 +00:00
John McCall 334ce7c1c4 Revert the ctor/dtor alias optimization for now; the buildbots can detect
some failure here that I can't.

llvm-svn: 96612
2010-02-18 21:31:48 +00:00
Dan Gohman 5ffef745c2 Make CodePlacementOpt detect special EH control flow by
checking whether AnalyzeBranch disagrees with the CFG
directly, rather than looking for EH_LABEL instructions.
EH_LABEL instructions aren't always at the end of the
block, due to FP_REG_KILL and other things. This fixes
an infinite loop compiling MultiSource/Benchmarks/Bullet.

llvm-svn: 96611
2010-02-18 21:25:53 +00:00
Devang Patel 3fe68ac2d7 Fix comments.
llvm-svn: 96610
2010-02-18 21:03:36 +00:00
Devang Patel 82ab3f8727 Destroy MDNodes gracefully while deleting llvm context.
llvm-svn: 96609
2010-02-18 20:53:16 +00:00
Fariborz Jahanian ffcfecdc1f Fixed a crash specific to blocks in c++ uncovered by an internal
test suite.

llvm-svn: 96608
2010-02-18 20:31:02 +00:00
Douglas Gregor 81d53769b5 Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().

llvm-svn: 96607
2010-02-18 20:22:25 +00:00
Douglas Gregor 707cf72cb8 Resurrect the displayDiagnostics parameter to clang_createIndex(), and
display captured diagnostics when we can't return an invalid
CXTranslationUnit.

llvm-svn: 96606
2010-02-18 20:11:31 +00:00
John McCall 5c60a6f597 Make deleting and complete dtor variants defer to other dtor variants by
calling them as subroutines.  This triggers whenever the alias optimization
doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases
or it's the deleting dtor.

llvm-svn: 96605
2010-02-18 19:59:28 +00:00
Devang Patel 441eb781ae Ignore target dependent value in grep search.
llvm-svn: 96604
2010-02-18 19:52:12 +00:00
Douglas Gregor 06dcf0375b Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.

Use this new function to display diagnostics within c-index-test.

llvm-svn: 96603
2010-02-18 19:08:21 +00:00
Ted Kremenek fcb3db7d68 Tidy up order of switch statement. No functionality change.
llvm-svn: 96602
2010-02-18 18:52:18 +00:00
Dale Johannesen 654528e8a7 Generate DBG_VALUE from dbg.value intrinsics. These currently
comes out as comments but will eventually generate DWARF.

llvm-svn: 96601
2010-02-18 18:51:15 +00:00
Ted Kremenek 7dff4163aa Sort visitor methods so we can easily tell what's implemented.
llvm-svn: 96600
2010-02-18 18:47:08 +00:00
Ted Kremenek 0e2930979d Change cursor behavior for attributes to have them visited as part of recursing
to the children of a Decl.

llvm-svn: 96599
2010-02-18 18:47:01 +00:00
Dan Gohman 9a36847b43 Clarify that ptrtoint+inttoptr are an alternative to GEP which are
not restricted by the GEP rules.

llvm-svn: 96598
2010-02-18 18:40:29 +00:00
Dan Gohman bffa44f975 Fix a typo.
llvm-svn: 96597
2010-02-18 18:22:41 +00:00
Dan Gohman 91b1289daa Clarify that the rules about object hopping kick in when a pointer is
deferenced, rather than when the pointer value is computed.

llvm-svn: 96596
2010-02-18 18:22:18 +00:00
Anders Carlsson f8b53536ed Attempt to fix the 32-bit test failures.
llvm-svn: 96595
2010-02-18 18:20:49 +00:00
Dan Gohman d879ce0715 Fix typos Duncan noticed.
llvm-svn: 96594
2010-02-18 18:19:17 +00:00
Daniel Dunbar 1c32596e56 tests: Tweak %clangxx definition to something which should be more portable.
llvm-svn: 96593
2010-02-18 18:10:26 +00:00
Douglas Gregor 33cdd81064 Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.

To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.

I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.

llvm-svn: 96592
2010-02-18 18:08:43 +00:00
Sanjiv Gupta a124a46748 Remap the call sites of a shared function in interrupt line functions.
llvm-svn: 96591
2010-02-18 18:00:35 +00:00
Anders Carlsson e5faca7cda Fix another bug and add another class.
llvm-svn: 96590
2010-02-18 17:32:33 +00:00
Sanjiv Gupta 32db8a17c5 Re-factoring.
llvm-svn: 96589
2010-02-18 17:32:25 +00:00
Anders Carlsson aa7444cd7d Add another class from cxx-vtable-ex.html
llvm-svn: 96588
2010-02-18 17:28:16 +00:00
Anders Carlsson 8847d9e40a More work on vcall offsets.
llvm-svn: 96587
2010-02-18 17:26:40 +00:00
Anders Carlsson 664b7d026e Add tests from the Itanium C++ ABI spec.
llvm-svn: 96586
2010-02-18 17:07:24 +00:00
Anders Carlsson 78277c7705 Start stubbing out vcall offset handling.
llvm-svn: 96585
2010-02-18 17:00:09 +00:00
Anders Carlsson 5a7654a9d8 Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.
llvm-svn: 96582
2010-02-18 16:29:24 +00:00
Anders Carlsson c8316a2e08 Remove some dead code.
llvm-svn: 96581
2010-02-18 16:24:20 +00:00
Duncan Sands 3d928db087 Uniformize the way these options are printed. Requested by
Russell Wallace.

llvm-svn: 96580
2010-02-18 14:37:52 +00:00
Duncan Sands 1804b4f9eb Remove terminating dot in description. Inconsistency pointed
out by Russell Wallace.

llvm-svn: 96579
2010-02-18 14:10:41 +00:00
Duncan Sands 142b9edaf1 Refer to -help instead of --help since this is what tools themselves say.
Also, have tools output -help-hidden rather than refer to --help-hidden,
for consistency, and likewise adjust documentation.  This doesn't change
every mention of --help, only those which seemed clearly safe.

llvm-svn: 96578
2010-02-18 14:08:13 +00:00
Benjamin Kramer 26d19c59f8 Try to fix the auroraux buildbot. I suspect it has a "#define SEC" somewhere.
llvm-svn: 96577
2010-02-18 13:02:13 +00:00