Nick Lewycky
707663eda8
Disallow the construction of SCEVs with could-not-compute operands. Catch CNCs
...
returned by BinomialCoefficient and don't try to operate with them. This
replaces the previous fix for PR2857.
llvm-svn: 57431
2008-10-13 03:58:02 +00:00
Mikhail Glushenkov
d3ec89e733
Add whitespace before a parenthesis.
...
llvm-svn: 57430
2008-10-13 02:46:01 +00:00
Mikhail Glushenkov
024f7cf859
Add a note on llvmc2 plugins + remove some trailing whitespace (my Emacs does this automatically).
...
llvm-svn: 57429
2008-10-13 02:08:34 +00:00
Chris Lattner
c52af45304
calls can be supported.
...
llvm-svn: 57428
2008-10-13 01:59:13 +00:00
Chris Lattner
e3df07e417
more notes
...
llvm-svn: 57427
2008-10-12 22:57:58 +00:00
Dale Johannesen
cc98e28f37
Change TAG_ names to DW_TAG for gcc (testsuite) compatibility.
...
llvm-svn: 57425
2008-10-12 21:23:01 +00:00
Owen Anderson
fe1f3d6e08
Fix a bug in live-in detection that caused lost-copy problems to show up.
...
llvm-svn: 57424
2008-10-12 20:39:30 +00:00
Chris Lattner
c4d68546e3
add some more notes
...
llvm-svn: 57423
2008-10-12 19:47:48 +00:00
Chris Lattner
2824ba52c3
this was to be removed after 2.4 branched.
...
llvm-svn: 57422
2008-10-12 18:57:09 +00:00
Argyrios Kyrtzidis
9103317346
More const-ness goodness.
...
llvm-svn: 57420
2008-10-12 18:45:56 +00:00
Dale Johannesen
bb5d04fc82
Remove "long" variants so these will pass on a 64-bit host.
...
llvm-svn: 57418
2008-10-12 18:40:49 +00:00
Argyrios Kyrtzidis
01622642d3
Improve the const-ness of a few methods.
...
No functionality change.
llvm-svn: 57417
2008-10-12 18:40:01 +00:00
Chris Lattner
6396952f37
add some notes
...
llvm-svn: 57416
2008-10-12 18:30:33 +00:00
Argyrios Kyrtzidis
3768ad6d58
Implement more efficient Decl <-> DeclContext conversions.
...
When the static type on the Decl side is a subclass of DeclContext the compiler will use a "inlinable" static_cast, instead of always using an out-of-line function call.
Note, though, that the isa<> check still uses an out-of-line function call.
llvm-svn: 57415
2008-10-12 16:14:48 +00:00
Anton Korobeynikov
46a9c01fff
Update size of inst correctly with segment override.
...
llvm-svn: 57414
2008-10-12 10:30:11 +00:00
Owen Anderson
de9812de43
Add special-case code to allow null-guards on calls to malloc.
...
llvm-svn: 57413
2008-10-12 08:10:46 +00:00
Owen Anderson
f2699bb57d
Make Escape Analysis work for any pointer.
...
llvm-svn: 57412
2008-10-12 07:33:29 +00:00
Owen Anderson
71cf4c440c
Add EscapeAnalysis.
...
llvm-svn: 57411
2008-10-12 06:49:21 +00:00
Dale Johannesen
ba074c0fed
Change Dwarf comments starting with AT_ to DW_AT_ to
...
match gcc. Helps with the testsuite.
llvm-svn: 57410
2008-10-12 06:20:47 +00:00
Chris Lattner
f6a3bda65e
make the -rewrite-test a bit more interesting: it now
...
wraps comments in <i> tags. Extend rewrite tokens to support
this minimal functionality.
llvm-svn: 57409
2008-10-12 06:09:52 +00:00
Owen Anderson
198966dbef
Fix crashes and infinite loops.
...
llvm-svn: 57408
2008-10-12 06:03:38 +00:00
Chris Lattner
b6aa53b7de
start implementing a token rewriter. At this point, it just reads in a file
...
and lets a client iterate over it.
llvm-svn: 57407
2008-10-12 05:44:03 +00:00
Chris Lattner
1782da2f84
Add a new -rewrite-test option, which is basically a
...
playground to experiment with some new rewriter approaches. For now
it is probably the most complex version of 'cat' ever invented.
llvm-svn: 57406
2008-10-12 05:29:20 +00:00
Chris Lattner
fc7d4a3bd2
Add a new -dump-raw-tokens option, which allows us to see raw tokens.
...
Rename -dumptokens to -dump-tokens.
llvm-svn: 57405
2008-10-12 05:03:36 +00:00
Chris Lattner
b11c3233d8
Change FormTokenWithChars to take the token kind to form, since all clients
...
were setting a kind and then forming it. This is just a minor API cleanup,
no functionality change.
llvm-svn: 57404
2008-10-12 04:51:35 +00:00
Chris Lattner
99e7d23455
When in keep whitespace mode, make sure to return block comments that are
...
unterminated.
llvm-svn: 57403
2008-10-12 04:19:49 +00:00
Chris Lattner
e01e758e11
Change SkipBlockComment and SkipBCPLComment to return true when in
...
keep comment mode, instead of returning false. This matches SkipWhitespace.
llvm-svn: 57402
2008-10-12 04:15:42 +00:00
Chris Lattner
4d96344c19
Add a new mode to the lexer which enables it to return all characters,
...
even whitespace, as tokens from the file. This is enabled with
L->SetKeepWhitespaceMode(true) on a raw lexer. In this mode, you too
can use clang as a really complex version of 'cat' with code like this:
Lexer RawLex(SourceLocation::getFileLoc(SM.getMainFileID(), 0),
PP.getLangOptions(), File.first, File.second);
RawLex.SetKeepWhitespaceMode(true);
Token RawTok;
RawLex.LexFromRawLexer(RawTok);
while (RawTok.isNot(tok::eof)) {
std::cout << PP.getSpelling(RawTok);
RawLex.LexFromRawLexer(RawTok);
}
This will emit exactly the input file, with no canonicalization or other
translation. Realistic clients actually do something with the tokens of
course :)
llvm-svn: 57401
2008-10-12 04:05:48 +00:00
Owen Anderson
36b48de43c
Duncan convinced me that it's not possible to transform control-based escapes into
...
data-based ones. Just be conservative when analyzing control-based escapes.
llvm-svn: 57400
2008-10-12 03:59:45 +00:00
Chris Lattner
924efdf623
Stop the preprocessor from poking the lexer's private parts.
...
llvm-svn: 57399
2008-10-12 03:31:33 +00:00
Chris Lattner
097a8b8777
Fix a couple more places that poke KeepCommentMode unnecesarily.
...
llvm-svn: 57398
2008-10-12 03:27:19 +00:00
Chris Lattner
8637abd333
add a new inKeepCommentMode() accessor to abstract the KeepCommentMode
...
ivar.
llvm-svn: 57397
2008-10-12 03:22:02 +00:00
Chris Lattner
e3f863a388
fix misleading comment.
...
llvm-svn: 57396
2008-10-12 01:34:51 +00:00
Chris Lattner
7c2e9809b1
Simplify raw mode lexing by treating an unterminate /**/ comment the
...
same we we do an unterminated string or character literal. This makes
it so we can guarantee that the lexer never calls into the
preprocessor (which would be suicide for a raw lexer).
llvm-svn: 57395
2008-10-12 01:31:51 +00:00
Chris Lattner
6b0c5ad096
add a comment.
...
llvm-svn: 57394
2008-10-12 01:23:27 +00:00
Chris Lattner
50c9050037
Change how raw lexers are handled: instead of creating them and then
...
using LexRawToken, create one and use LexFromRawLexer. This avoids
twiddling the RawLexer flag around and simplifies some code (even
speeding raw lexing up a tiny bit).
This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it.
llvm-svn: 57393
2008-10-12 01:15:46 +00:00
Chris Lattner
5d3e26a4f6
silence release-assert warnings.
...
llvm-svn: 57392
2008-10-12 00:31:50 +00:00
Chris Lattner
79ef843533
silence some release-assert warnings.
...
llvm-svn: 57391
2008-10-12 00:28:42 +00:00
Chris Lattner
e05f534628
silence a bunch of warnings in a release-assert build.
...
llvm-svn: 57390
2008-10-12 00:26:57 +00:00
Chris Lattner
87e97ea7b8
improve a comment.
...
llvm-svn: 57389
2008-10-12 00:23:07 +00:00
Chris Lattner
c46186e890
fix typo
...
llvm-svn: 57388
2008-10-11 23:59:03 +00:00
Chris Lattner
da435910e8
Fix PR2697 by rewriting the '(X / pos) op neg' logic. This also changes
...
a couple other cases for clarity, but shouldn't affect correctness.
Patch by Eli Friedman!
llvm-svn: 57387
2008-10-11 22:55:00 +00:00
Chris Lattner
f94e1bc53a
update win32 project file, patch provided by OvermindDL1 on llvmdev.
...
llvm-svn: 57386
2008-10-11 22:14:59 +00:00
Chris Lattner
2753955fc0
Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
...
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.
llvm-svn: 57385
2008-10-11 22:08:30 +00:00
Chris Lattner
d57b7603f9
rearrange some code.
...
llvm-svn: 57384
2008-10-11 22:07:19 +00:00
Chris Lattner
bea568f612
random cleanup
...
llvm-svn: 57383
2008-10-11 22:06:50 +00:00
Daniel Dunbar
a4a0813fb4
Add API changes which affected me to release notes:
...
- DbgStopPointInst
- Attributes (needs filling in)
llvm-svn: 57382
2008-10-11 21:26:56 +00:00
Duncan Sands
23ee981e8e
Fix comment typo.
...
llvm-svn: 57381
2008-10-11 19:34:24 +00:00
Anton Korobeynikov
2589777f3f
Add ability to override segment (mostly for code emitter purposes).
...
llvm-svn: 57380
2008-10-11 19:09:15 +00:00
Daniel Dunbar
2a5754521d
Add GCC 4.1.2 from Debian to known bad GCC list.
...
llvm-svn: 57379
2008-10-11 18:40:33 +00:00