Commit Graph

50367 Commits

Author SHA1 Message Date
Douglas Gregor f49fdf8337 Fix strange quote characters
llvm-svn: 59729
2008-11-20 13:33:37 +00:00
Duncan Sands 3fa0a5afab Add some documentation.
llvm-svn: 59727
2008-11-20 10:34:43 +00:00
Daniel Dunbar 203bfdfcf3 De-unionize fields in Token class.
- This is fairly gross but although the code is conceptually the
   same, introducting the union causes gcc 4.2 on x86 (darwin, if that
   matters) to pessimize LexTokenInternal which is critical to our
   preprocessor performance.

This speeds up -Eonly lexing of Cocoa.h by ~4.7% in my timings and
reduces the code size of LexTokenInternal by 8.6%.

llvm-svn: 59725
2008-11-20 08:01:39 +00:00
Ted Kremenek c490c8877c Rewrote PTHLexer::Lex by digging through the sources of Lexer again. Now we can do basic macro expansion using the PTHLexer.
llvm-svn: 59724
2008-11-20 07:58:05 +00:00
Ted Kremenek 85b48c6e3a Add ugly "test harness" for PTHLexer that is not enabled by default. The
(temporary hack) to test the PTHLexer is that whenever we would create a Lexer
object we instead raw lex a memory buffer first and then use the PTHLexer. This
logic exists only to driver the PTHLexer and will be removed/changed in the
future. Note that the regular path using normal Lexer objects is what is used by
default.

llvm-svn: 59723
2008-11-20 07:56:33 +00:00
Ted Kremenek f4fd9b7ec4 Added virtual method 'IndirectLex' to PTHLexer. This will likely get removed in the future when we correctly handle #include processing.
llvm-svn: 59722
2008-11-20 07:54:06 +00:00
Ted Kremenek 49e4579a86 Preprocessor::isCurrentLexer() now takes a PreprocessorLexer* argument to match against CurPPLexer instead of CurLexer.
llvm-svn: 59721
2008-11-20 07:53:31 +00:00
Mon P Wang e15a540071 Allow XMM2 and XMM3 to be used for non ABI compliant code.
llvm-svn: 59720
2008-11-20 07:48:19 +00:00
Bill Wendling 165b45d385 80-column violation.
llvm-svn: 59718
2008-11-20 07:24:30 +00:00
Bill Wendling 51e015f9bb Reformatting. No functionality change.
llvm-svn: 59717
2008-11-20 07:23:34 +00:00
Chris Lattner 9b5a53424b Daniel really really likes = instead of += :)
llvm-svn: 59716
2008-11-20 07:09:32 +00:00
Chris Lattner a256679f19 add an operator= to assign to smallstring.
llvm-svn: 59715
2008-11-20 07:09:17 +00:00
Chris Lattner 651d42dba5 remove the last old-fashioned Diag method. Transition complete!
llvm-svn: 59714
2008-11-20 06:38:18 +00:00
Chris Lattner f7e3f6d294 remove another old Diag method.
llvm-svn: 59713
2008-11-20 06:13:02 +00:00
Chris Lattner 29e812b905 remove another old-school Diag method.
llvm-svn: 59712
2008-11-20 06:06:08 +00:00
Chris Lattner ec7f7732f1 remove the type_info identifier cache. Compared to the cost
of doing the lookup_decl, the hash lookup is cheap.  Also,
typeid doesn't happen enough in real world code to worry about
it.

I'd like to eventually get rid of KnownFunctionIDs from Sema
also, but today is not that day.

llvm-svn: 59711
2008-11-20 05:51:55 +00:00
Chris Lattner 0e73b2c352 compared to the rest of the code in Sema::GetStdNamespace(),
looking up the "std" identifier is trivial.  Just do it, particularly
since this is only done if the namespace hasn't already been looked up.

llvm-svn: 59710
2008-11-20 05:45:14 +00:00
Chris Lattner 66e32812cd remove some other identifiers that are looked up really early and only
used in one cold place.

llvm-svn: 59709
2008-11-20 05:41:43 +00:00
Chris Lattner 4500f721ed instead of looking up super at startup time,
just check for it when needed.  It doesn't incur real cost
in any hot paths.

llvm-svn: 59708
2008-11-20 05:35:30 +00:00
Scott Michel a7521ee3df CellSPU: Custom lower truncating stores of i8 to i1 (should not have been
promote), fix signed conversion of indexed offsets.

llvm-svn: 59707
2008-11-20 05:01:09 +00:00
Chris Lattner 68e486804f Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.

llvm-svn: 59706
2008-11-20 04:42:34 +00:00
Nick Lewycky e42592e33a undef beats zero. Fix this missed optimization opportunity. Patch by Matt Elder!
llvm-svn: 59705
2008-11-20 04:36:13 +00:00
Scott Michel 4b12480063 Revert accidental last patch
llvm-svn: 59704
2008-11-20 04:28:08 +00:00
Scott Michel e361f08ab0 CellSPU: Adjust spacing/tabulation
llvm-svn: 59703
2008-11-20 04:26:21 +00:00
Dan Gohman 8e066a1349 Remove a remnant of list-burr's fast mode.
llvm-svn: 59702
2008-11-20 03:32:45 +00:00
Dan Gohman 186f65d275 Factor out the SethiUllman numbering logic from the list-burr and
list-tdrr schedulers into a common base class.

llvm-svn: 59701
2008-11-20 03:30:37 +00:00
Dan Gohman fd08af4ee7 Remove the "fast" form of the list-burr scheduler, and use the
dedicated "fast" scheduler in -fast mode instead, which is
faster. This speeds up llc -fast by a few percent on some
testcases -- the speedup only happens for code not handled by
fast-isel.

llvm-svn: 59700
2008-11-20 03:11:19 +00:00
Oscar Fuentes 4d69fd4f1c CMake: when building shared libraries, use -fPIC for compiling
partially linked objects.

llvm-svn: 59699
2008-11-20 03:10:17 +00:00
Dan Gohman 3f656dfa03 Facter AddPseudoTwoAddrDeps and associated infrasructure out of
the list-burr scheduler so that it can be used by the list-tdrr
scheduler too.

llvm-svn: 59698
2008-11-20 02:45:51 +00:00
Evan Cheng c22215a090 - Register scavenger should use MachineRegisterInfo and internal map to find the first use of a register after a given machine instruction.
- When scavenging a register, in addition to the spill, insert a restore before the first use.
- Abort if client is looking to scavenge a register even when a previously scavenged register is still live.

llvm-svn: 59697
2008-11-20 02:32:35 +00:00
Evan Cheng 5f23e9fe73 Fix a thinko. MO is getOperand(i-1) so we don't have to adjust e.
llvm-svn: 59696
2008-11-20 02:25:51 +00:00
Ted Kremenek 2af3cee287 Make FIXME a hard assertion.
llvm-svn: 59695
2008-11-20 01:52:55 +00:00
Ted Kremenek b33ce32bda Preprocessor::getCurrentFileLexer() now returns a PreprocessorLexer* instead of
a Lexer*. This means it will either return the current (normal) file Lexer or a
PTHLexer.

llvm-svn: 59694
2008-11-20 01:49:44 +00:00
Ted Kremenek 300590b584 Just use the SourceLocation of SysHeaderTok when doing a callback to emit #line
information. A diff of the -E output for Cocoa.h shows that there is no change
in output.

llvm-svn: 59693
2008-11-20 01:45:11 +00:00
Dan Gohman 866b034839 Add #include <climits> to get the definition of INT_MAX.
llvm-svn: 59692
2008-11-20 01:41:34 +00:00
Ted Kremenek 6552d259d4 Assign the result of getCurrentFileLexer() to a PreprocessorLexer* instead of Lexer* (narrower interface).
llvm-svn: 59691
2008-11-20 01:35:24 +00:00
Ted Kremenek b0262c1e64 - Default initialize ParsingPreprocessorDirective, ParsingFilename, and
LexingRawMode in the ctor of PreprocessorLexer.

- PTHLexer: Use "LastToken" instead of "NumToken"

llvm-svn: 59690
2008-11-20 01:29:45 +00:00
Dan Gohman 4ce15e12b9 Factor out the code for verifying the work of the scheduler,
extend it a bit, and make use of it in all schedulers, to
ensure consistent checking.

llvm-svn: 59689
2008-11-20 01:26:25 +00:00
Devang Patel c8b2fe1eed Do not forget llvm.dbg.declare's first argument while removing debugging information.
llvm-svn: 59688
2008-11-20 01:20:42 +00:00
Ted Kremenek 61915f5d4a Add (untested) implementation of PTHLexer::isNextPPTokenLParen() and PTHLexer::DiscardToEndOfLine().
llvm-svn: 59687
2008-11-20 01:16:50 +00:00
Ted Kremenek 678f8d7992 Use ScheduleDAGSDNodes.h instead of ScheduleDAG.h (stuff moved around).
llvm-svn: 59684
2008-11-20 00:52:19 +00:00
Zhongxing Xu 06b377668d Split region store specific test cases.
llvm-svn: 59683
2008-11-20 00:46:15 +00:00
Fariborz Jahanian 003e83004b More objc gc stuff. Read/Write barriers for local static/extern,
diagnostics on use of __weak attribute on fields,
Early support for read/write barriers for objc fields.

llvm-svn: 59682
2008-11-20 00:15:42 +00:00
Bill Wendling 8d5b57b354 Copy the tblgen utility.
llvm-svn: 59681
2008-11-20 00:11:57 +00:00
Dan Gohman 4c3034f711 Simplify this code a little. In the fast scheduler, CreateNewSUnit
and CreateClone don't add any extra value.

llvm-svn: 59679
2008-11-19 23:39:02 +00:00
Evan Cheng 59213d64e5 Eliminate a compile time warning.
llvm-svn: 59678
2008-11-19 23:21:33 +00:00
Evan Cheng dfb97383d5 Eliminate a compile time warning.
llvm-svn: 59677
2008-11-19 23:21:11 +00:00
Dan Gohman 60cb69e665 Experimental post-pass scheduling support. Post-pass scheduling
is currently off by default, and can be enabled with
-disable-post-RA-scheduler=false.

This doesn't have a significant impact on most code yet because it doesn't
yet do anything to address anti-dependencies and it doesn't attempt to
disambiguate memory references. Also, several popular targets
don't have pipeline descriptions yet.

The majority of the changes here are splitting the SelectionDAG-specific
code out of ScheduleDAG, so that ScheduleDAG can be moved to
libLLVMCodeGen.a. The interface between ScheduleDAG-using code and
the rest of the scheduling code is somewhat rough and will evolve.

llvm-svn: 59676
2008-11-19 23:18:57 +00:00
Douglas Gregor 20b300231a Beef up the test for function call operators slightly
llvm-svn: 59675
2008-11-19 22:59:19 +00:00
Douglas Gregor ab7897ac44 Implement the rest of C++ [over.call.object], which permits the object
being called to be converted to a reference-to-function,
pointer-to-function, or reference-to-pointer-to-function. This is done
through "surrogate" candidate functions that model the conversions
from the object to the function (reference/pointer) and the
conversions in the arguments.

llvm-svn: 59674
2008-11-19 22:57:39 +00:00