Commit Graph

80461 Commits

Author SHA1 Message Date
Douglas Gregor e56c353eb1 Try to appease MSVC's standard library
llvm-svn: 98878
2010-03-18 21:28:30 +00:00
Douglas Gregor 5810ead358 Try to appease MSVC
llvm-svn: 98875
2010-03-18 21:25:12 +00:00
Ted Kremenek 361ffd947c Make PredefinedExpr::ComputeName() more robust to incorrect
code when we are printing the name of an Objective-C method
whose class has not been declared.  Fixes <rdar://problem/7495713>.

llvm-svn: 98874
2010-03-18 21:23:08 +00:00
Ted Kremenek abb1dddfcd Add bounds check in PCHReader. when reading source file entry record
llvm-svn: 98873
2010-03-18 21:23:05 +00:00
Chris Lattner 13590892e7 simplify this code, the # of sets in the pattern for an instruction
shouldn't change this.

llvm-svn: 98872
2010-03-18 21:15:05 +00:00
Chris Lattner 81fd1f20ba disallow concatenation of two dags with different operators.
llvm-svn: 98871
2010-03-18 21:07:51 +00:00
Chris Lattner 1f22d278f3 rewrite this to not artificially force concat the ins/outs list.
llvm-svn: 98870
2010-03-18 21:07:39 +00:00
Chris Lattner fb2ceede8f fix some buggy ops concatentation
llvm-svn: 98869
2010-03-18 21:06:54 +00:00
Chris Lattner 0f03747577 eliminate support for "ops" in the input/output list of an
instruction.  Instructions must use 'ins' and 'outs' now.

llvm-svn: 98868
2010-03-18 20:56:35 +00:00
Chris Lattner b7f6d172b8 use ins/outs
llvm-svn: 98867
2010-03-18 20:55:31 +00:00
Chris Lattner 983b479c91 use ins/outs.
llvm-svn: 98866
2010-03-18 20:55:18 +00:00
Chris Lattner 5f418eafdc remove some code that was working around old sparc v9 backend bugs.
Add checking that the input/output operand list in spelled right.

llvm-svn: 98865
2010-03-18 20:50:52 +00:00
Chris Lattner 0204bc3de1 outs come before ins.
llvm-svn: 98864
2010-03-18 20:50:06 +00:00
Eric Christopher 52ecfdf3c5 Make fast-isel understand llvm.stackprotector.
llvm-svn: 98862
2010-03-18 20:27:26 +00:00
Bob Wilson a7f236ae3a Refactor NEON ld/st instructions to hardcode class arguments that are constants.
No functional changes.

llvm-svn: 98860
2010-03-18 20:18:39 +00:00
Daniel Dunbar 9e6437ee7d lit: Tweak example tests config.
llvm-svn: 98859
2010-03-18 20:06:05 +00:00
Daniel Dunbar 63ec093b6e MC/X86/AsmMatcher: Use the new instruction cleanup routine to implement a
temporary workaround for matching inc/dec on x86_64 to the correct instruction.
 - This hack will eventually be replaced with a robust mechanism for handling
   matching instructions based on the available target features.

llvm-svn: 98858
2010-03-18 20:06:02 +00:00
Daniel Dunbar 451a435473 MC/AsmMatcher: Add support for target specific "instruction cleanup" functions,
to allow custom post-processing of matched instructions.

llvm-svn: 98857
2010-03-18 20:05:56 +00:00
Chris Lattner b3f659c8c8 fix an x86-64 encoding bug Daniel found.
llvm-svn: 98855
2010-03-18 20:04:36 +00:00
Dan Gohman 17323bb7cf offsetof always has type size_t.
llvm-svn: 98854
2010-03-18 19:37:35 +00:00
Dan Gohman a5ca578384 Simplify this code.
llvm-svn: 98853
2010-03-18 19:34:33 +00:00
Benjamin Kramer f9c044f6dc Fix a name clash that was breaking MSVC builds.
llvm-svn: 98852
2010-03-18 19:34:06 +00:00
Dan Gohman cb4935018d Explicitly cast std::min's arguments to avoid type mismatches.
llvm-svn: 98851
2010-03-18 19:01:12 +00:00
Gabor Greif a9d0ef1e45 another one
llvm-svn: 98850
2010-03-18 18:59:08 +00:00
Fariborz Jahanian 8342e5776e Some cleanup, change diagnostic when assigning to
a property which is not lvalue.

llvm-svn: 98848
2010-03-18 18:50:41 +00:00
Dan Gohman 01c65a2622 Define placement new wrappers for BumpPtrAllocator and
RecyclingAllocator to allow client code to be simpler, and
simplify several clients.

llvm-svn: 98847
2010-03-18 18:49:47 +00:00
Dan Gohman ed4c2eb7bf Make this test more lenient; with SmallVector now using actually
aligned storage, the capacity may be more than what is explicitly
requested.

llvm-svn: 98846
2010-03-18 18:47:50 +00:00
Bob Wilson 3c7cde466e Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() to
always create a new jump table.  The intention was to avoid merging jump
tables in SelectionDAGBuilder, and to wait for the branch folding pass to
merge tables.  Unfortunately, the same getJumpTableIndex() method is also
used to merge tables in branch folding, so as a result of this change
branch tables are never merged.  Worse, the branch folding code is expecting
getJumpTableIndex to always return the index of an existing table, but with
this change, it never does so.  In at least some cases, e.g., pr6543, this
creates references to non-existent tables.

I've fixed the problem by adding a new createJumpTableIndex function, which
will always create a new table, and I've changed getJumpTableIndex to only
look at existing tables.

llvm-svn: 98845
2010-03-18 18:42:41 +00:00
Dan Gohman 48d09cab66 Fix a bug found by inspection; in the __GNUC__ code, the alignment
doesn't apply to the type, only to the variable, so subsequent uses
of U which expect it to be aligned weren't actually aligned.

llvm-svn: 98843
2010-03-18 18:40:47 +00:00
Douglas Gregor 78ae2481b6 Explicitly link macro instantiations to macro definitions in the
preprocessing record. Use that link with clang_getCursorReferenced()
and clang_getCursorDefinition() to match instantiations of a macro to
the definition of the macro.

llvm-svn: 98842
2010-03-18 18:23:03 +00:00
Andrew Lenharth 1a5bea2017 Nick wants these alphabetized
llvm-svn: 98840
2010-03-18 18:18:00 +00:00
Chris Lattner a3a66b28b6 add a special relocation type for movq loads for object
files that produce special relocation types where the 
linker changes movq's into lea's.

llvm-svn: 98839
2010-03-18 18:10:56 +00:00
Dan Gohman 5856f2092c Add explicit braces to avoid ambiguous ‘else’.
llvm-svn: 98838
2010-03-18 18:07:13 +00:00
Douglas Gregor 06d6d32762 Expose macro definitions as CIndex cursors. These can still only be
generated by clang_annotateTokens().

llvm-svn: 98837
2010-03-18 18:04:21 +00:00
Douglas Gregor 065f8d11ca Introduce the notion of a "preprocessing record", which keeps track of
the macro definitions and macro instantiations that are found
during preprocessing. Preprocessing records are *not* generated by
default; rather, we provide a PPCallbacks subclass that hooks into the
existing callback mechanism to record this activity.

The only client of preprocessing records is CIndex, which keeps track
of macro definitions and instantations so that they can be exposed via
cursors. At present, only token annotation uses these facilities, and
only for macro instantiations; both will change in the near
future. However, with this change, token annotation properly annotates
macro instantiations that do not produce any tokens and instantiations
of macros that are later undef'd, improving our consistency.

Preprocessing directives that are not macro definitions are still
handled by clang_annotateTokens() via re-lexing, so that we don't have
to track every preprocessing directive in the preprocessing record.

Performance impact of preprocessing records is still TBD, although it
is limited to CIndex and therefore out of the path of the main compiler.

llvm-svn: 98836
2010-03-18 17:52:52 +00:00
Chris Lattner eaceb9fd39 callq is pcrelative
llvm-svn: 98835
2010-03-18 17:52:22 +00:00
Benjamin Kramer 966e934b34 Replace some SmallVectors with arrays.
llvm-svn: 98833
2010-03-18 16:59:57 +00:00
Bob Wilson ce51f782dd Check if function names start with "llvm." before trying to lookup them up as
intrinsics.  The intrinsic lookup code assumes that this check has been done
and assumes the names are at least 6 characters long.  Valgrind complained
about this.  pr6638.

llvm-svn: 98831
2010-03-18 16:52:15 +00:00
Devang Patel 0b39f10d10 Fix comment.
llvm-svn: 98830
2010-03-18 16:41:16 +00:00
Dan Gohman 6556c8962c Add the ability to "intern" FoldingSetNodeID data into a
BumpPtrAllocator-allocated region to allow it to be stored in a more
compact form and to avoid the need for a non-trivial destructor call.

Use this new mechanism in ScalarEvolution instead of
FastFoldingSetNode to avoid leaking memory in the case where a
FoldingSetNodeID uses heap storage, and to reduce overall memory
usage.

llvm-svn: 98829
2010-03-18 16:16:38 +00:00
Douglas Gregor 1793c07114 Defang
llvm-svn: 98827
2010-03-18 15:37:47 +00:00
Douglas Gregor 02ded2a56c More token-annotation experimentation, preprocessing the annotated
token sequence to detect macro instantiations (that produce at least
token). WIP.

llvm-svn: 98826
2010-03-18 15:23:44 +00:00
Douglas Gregor 48d75d1bda Defang a test that's failing intermittently on windows
llvm-svn: 98825
2010-03-18 14:59:12 +00:00
Wesley Peck 3aa84e531e Adding MicroBlaze as an experimental backend in the release notes
llvm-svn: 98824
2010-03-18 14:31:30 +00:00
Kovarththanan Rajaratnam 8fc5a80905 Fix 80 col violation
llvm-svn: 98823
2010-03-18 13:56:20 +00:00
Kovarththanan Rajaratnam 5a487710b5 Simply tags target
llvm-svn: 98822
2010-03-18 13:52:43 +00:00
Oscar Fuentes e5ca63acc8 CMake: Add options for using static runtime on MSVC++ build.
Patch by Victor Zverovich!

llvm-svn: 98821
2010-03-18 13:52:05 +00:00
Kovarththanan Rajaratnam dae75defc8 Add an extra newline to separate PP directives from the contents
llvm-svn: 98820
2010-03-18 13:16:38 +00:00
Benjamin Kramer 4f67227625 Try to fix a valgrind error on 32 bit platforms: use %zu instead of %llu to format a size_t.
llvm-svn: 98819
2010-03-18 12:18:36 +00:00
John McCall fb6f52671a from code inspection, we were treating placement news with one argument as
non-placement news when selecting the corresponding operator delete;  this is
fixed.
Access and ambiguity control for calls to operator new and delete.  Also AFAICT

llvm-svn: 98818
2010-03-18 08:19:33 +00:00