Nick Lewycky
5cbc7c4ae9
Teach the constant folder how to not a cmpinst.
...
llvm-svn: 82378
2009-09-20 06:24:51 +00:00
Chris Lattner
acb70ff251
smallvectorize getExtraOptionNames
...
llvm-svn: 82377
2009-09-20 06:21:43 +00:00
Chris Lattner
cacb071233
minor cleanups.
...
llvm-svn: 82375
2009-09-20 06:18:38 +00:00
Chris Lattner
b1db248193
strength reduce further StringRef-> const char*, saving another 620 bytes.
...
llvm-svn: 82372
2009-09-20 05:53:47 +00:00
Nick Lewycky
93d1111b1c
Try turning icmp(bitcast(x), bitcast(y)) into icmp(bitcast(bitcast(x)), y) in
...
the hopes that the two bitcasts will merge.
llvm-svn: 82371
2009-09-20 05:48:50 +00:00
Chris Lattner
b7eb454f66
switch an std::string to StringRef, shaving 400 bytes off CommandLine.o
...
llvm-svn: 82370
2009-09-20 05:48:01 +00:00
Nick Lewycky
b96f9df101
Remove tabs I added.
...
llvm-svn: 82369
2009-09-20 05:47:45 +00:00
Chris Lattner
346c1f60db
the switch from std::map -> StringMap caused --help output to be in
...
non-sorted order, restore the sort.
llvm-svn: 82368
2009-09-20 05:37:24 +00:00
Chris Lattner
483832f33a
eliminate the duplicate detection loop, moving it into the loop that populates the Opts vector in the first place.
...
llvm-svn: 82367
2009-09-20 05:22:52 +00:00
Chris Lattner
5b8c4b309a
Eliminate a masochistic "algorithm" loop, shrinking CommandLine.o from 71524->70700 bytes.
...
llvm-svn: 82366
2009-09-20 05:18:28 +00:00
Chris Lattner
3a20fca97c
don't use count + insert, just do insert + failure. Also, instead of deleting from
...
the middle of a vector, swap the last element in and pop_back. Also saves 330 bytes :)
llvm-svn: 82365
2009-09-20 05:15:12 +00:00
Chris Lattner
488639ad3b
switch to SmallPtrSet instead of std::set, saving 1K from the
...
release-asserts .o file (72900->71856).
llvm-svn: 82364
2009-09-20 05:12:14 +00:00
Chris Lattner
80674c762c
change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.
...
llvm-svn: 82363
2009-09-20 05:06:23 +00:00
Chris Lattner
6a6a75896d
Several changes together in a murky mess:
...
1. Change some "\n" -> '\n'.
2. eliminte some std::string's by using raw_ostream::indent.
3. move a bunch of code out of the main arg parser routine into
a new static HandlePrefixedOrGroupedOption function.
4. Greatly simplify the implementation of getOptionPred, and make
it avoid splitting prefix options at = when that doesn't match
a non-prefix option.
llvm-svn: 82362
2009-09-20 05:03:30 +00:00
Nick Lewycky
42065f1555
Clean up the usage of evaluateICmpRelation's return value.
...
Add another line to the ConstantExprFold test to demonstrate the GEPs may not
wrap around in either the signed or unsigned senses.
llvm-svn: 82361
2009-09-20 04:27:06 +00:00
Daniel Dunbar
16b2c02cd3
Fix refacto, this code was expecting to stride past the argument prefix.
...
llvm-svn: 82360
2009-09-20 04:03:41 +00:00
Daniel Dunbar
4e33798de0
Strip trailing whitespace.
...
llvm-svn: 82359
2009-09-20 04:03:34 +00:00
Nick Lewycky
261d7a49b1
Remove dead store by taking a guess at what Chris meant. I wasn't able to
...
design a testcase that would tickle this behaviour.
llvm-svn: 82357
2009-09-20 03:48:46 +00:00
Bill Wendling
fe2bcb9889
Still one more thing wrong here...
...
llvm-svn: 82356
2009-09-20 02:27:06 +00:00
Daniel Dunbar
378331a13d
Tabs -> spaces, and remove trailing whitespace.
...
llvm-svn: 82355
2009-09-20 02:20:51 +00:00
Bill Wendling
d402d7374a
Here's fun! It turns out that these filter functions can be internal. If they're
...
internal, they shouldn't use the indirect pointer stuff. In the case of
throw_rethrow_test, it was marked as 'internal' and calculated its own offset to
its contents.
llvm-svn: 82354
2009-09-20 02:19:49 +00:00
Nick Lewycky
79db45a852
Delete dead code. sext and zext can not turn integers into pointers. Further,
...
the optimization described in the comment is only valid with target data.
llvm-svn: 82353
2009-09-20 02:11:47 +00:00
Chris Lattner
462444d1c8
convert argname to StringRef, simplifying LookupOption.
...
llvm-svn: 82352
2009-09-20 02:02:24 +00:00
Chris Lattner
2c4d26f38f
convert 'Value' to StringRef which makes it easier to
...
maintain the "null is unspecified, empty is empty" semantics.
llvm-svn: 82351
2009-09-20 01:53:12 +00:00
Chris Lattner
08e8c98fec
Change CommaSeparated processing to do it with StringRef instead of temporary std::strings.
...
This requires StringRef'izing ProvideOption which I also did.
llvm-svn: 82350
2009-09-20 01:49:31 +00:00
Nick Lewycky
ca1f29ee1b
Value* were never meant to be const. Removing constness from the constant
...
folder removes a lot of const_casting and requires no changes to clang or
llvm-gcc.
llvm-svn: 82349
2009-09-20 01:35:59 +00:00
Chris Lattner
5b5a0ec095
rewrite ParseCStringVector in terms of stringref.
...
llvm-svn: 82348
2009-09-20 01:33:46 +00:00
Chris Lattner
72732da2f0
move a couple non-trivial methods out of line, add new
...
find_first_of/find_first_of methods.
llvm-svn: 82347
2009-09-20 01:22:16 +00:00
Chris Lattner
d32099fb1f
coding style cleanup
...
llvm-svn: 82346
2009-09-20 01:11:23 +00:00
Chris Lattner
85478e8cd1
convert a bunch more stuff to use StringRef. The ArgName arguments are now
...
stringref because they may not be nul terminated. For options like -Lfoo
this now avoids a O(n) temporary std::strings where N is the length of
the string after -L.
llvm-svn: 82345
2009-09-20 00:40:49 +00:00
Dale Johannesen
f8d05d7ce6
When computing live intervals for earlyclobber operands,
...
we pushed the beginning of the interval back 1, so the
interval would overlap with inputs that die. We were
also pushing the end of the interval back 1, though,
which means the earlyclobber didn't overlap with other
output operands. Don't do this. PR 4964.
llvm-svn: 82342
2009-09-20 00:36:41 +00:00
Chris Lattner
bb111eeae4
avoid a bunch of malloc thrashing for PositinoalVals by eliminating
...
a std::vector and a bunch of std::string temporaries.
llvm-svn: 82341
2009-09-20 00:07:40 +00:00
Nick Lewycky
6ad3b51864
Teach the constant folder how to handle a few simple i1 cases.
...
llvm-svn: 82340
2009-09-20 00:04:02 +00:00
Chris Lattner
b29a51b4d4
Avoid some temporary strings.
...
llvm-svn: 82339
2009-09-19 23:59:02 +00:00
Chris Lattner
d2a0138c62
add some more overloads of StringRef::getAsInteger for
...
common and useful integer types.
llvm-svn: 82338
2009-09-19 23:58:48 +00:00
Bill Wendling
5dfef4dce4
Revert r82274. It's causing failures in the CINT2006 benchmarks.
...
llvm-svn: 82336
2009-09-19 22:02:37 +00:00
Daniel Dunbar
9ae3c56c92
Fix indentation.
...
llvm-svn: 82333
2009-09-19 20:40:14 +00:00
Daniel Dunbar
39c0d90339
Strip trailing whitespace.
...
llvm-svn: 82332
2009-09-19 20:40:05 +00:00
Nick Lewycky
3b7df4bbd5
Remove the default value for ConstantStruct::get's isPacked parameter and
...
update the code which was broken by this.
llvm-svn: 82327
2009-09-19 20:30:26 +00:00
Chris Lattner
e6fa81a475
provide a "strtoull" operation that works on StringRef's.
...
llvm-svn: 82322
2009-09-19 19:47:14 +00:00
Nick Lewycky
e539e55f2a
Add a comment explaining why you would ever want to do this.
...
llvm-svn: 82319
2009-09-19 19:00:06 +00:00
Chris Lattner
86c1fbbc0a
convert a bunch of std::strings to use StringRef. This should eliminate
...
a massive number of temporary strings created when parsing a command line.
More still left to eliminate.
llvm-svn: 82318
2009-09-19 18:55:05 +00:00
Nick Lewycky
441d1e8dd5
Lett users of sparse propagation do their own thing with phi nodes if they want
...
to. This can be combined with LCSSA or SSI form to store more information on a
PHINode than can be computed by looking at its incoming values.
llvm-svn: 82317
2009-09-19 18:33:36 +00:00
Duncan Sands
6f1a8215c0
The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".
...
It prints the content of all bbs, instead of printing empty bbs to make the
CFG more readable. Fix this. Patch by Tobias Grosser.
llvm-svn: 82315
2009-09-19 11:25:44 +00:00
Evan Cheng
a82b43fb81
Fix funky comments.
...
llvm-svn: 82314
2009-09-19 10:09:15 +00:00
Benjamin Kramer
b8b2ef98f4
Try to speed up the slowest parts of the CommandLine library
...
- Replace std::map<std::string with StringMap
- Eliminate unnecessary std::string copies
- ~10% speed-up for clang's testsuite on my machine (debug build)
llvm-svn: 82312
2009-09-19 10:01:45 +00:00
Evan Cheng
7714c8412d
Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
...
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Victor Hernandez
fe5347d782
Enhance transform passes so that they apply the same tranforms to malloc calls as to MallocInst.
...
Reviewed by Dan Gohman.
llvm-svn: 82300
2009-09-18 22:35:49 +00:00
Bob Wilson
0ad3a28b10
Fix a comment typo and some whitespace.
...
llvm-svn: 82285
2009-09-18 21:43:11 +00:00
Bob Wilson
1b311a6a9b
Fix a typo in an assertion message.
...
llvm-svn: 82284
2009-09-18 21:42:44 +00:00