Eric Christopher
7258dcd77f
Revert 101465, it broke internal OpenGL testing.
...
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Gabor Greif
f375520f7b
reapply r101434
...
with a fix for self-hosting
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101465
2010-04-16 15:33:14 +00:00
Gabor Greif
403e9694f9
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
...
llvm-svn: 101434
2010-04-16 01:16:20 +00:00
Gabor Greif
33ae80bff7
reapply r101364, which has been backed out in r101368
...
with a fix
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101397
2010-04-15 20:51:13 +00:00
Gabor Greif
9fd00c7d25
back out r101364, as it trips the linux nightlybot on some clang C++ tests
...
llvm-svn: 101368
2010-04-15 12:46:56 +00:00
Gabor Greif
aafd209632
rotate CallInst operands, i.e. move callee to the back
...
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101364
2010-04-15 10:49:53 +00:00
Mon P Wang
c576ee9040
Reapply address space patch after fixing an issue in MemCopyOptimizer.
...
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
llvm-svn: 100304
2010-04-04 03:10:48 +00:00
Mon P Wang
999c1b927b
Revert r100191 since it breaks objc in clang
...
llvm-svn: 100199
2010-04-02 18:43:02 +00:00
Mon P Wang
a972ab8564
Reapply address space patch after fixing an issue in MemCopyOptimizer.
...
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
llvm-svn: 100191
2010-04-02 18:04:15 +00:00
Bob Wilson
6f7fd28824
Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.
...
llvm-svn: 99948
2010-03-30 22:27:04 +00:00
Mon P Wang
7460571381
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
...
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.
llvm-svn: 99928
2010-03-30 20:55:56 +00:00
Evan Cheng
c12c2d9bb4
Move OptChkCall off LibCallOptimization into StrCpyOpt.
...
llvm-svn: 99418
2010-03-24 20:19:04 +00:00
Evan Cheng
d9e822345c
Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable optimizations down stream.
...
llvm-svn: 99282
2010-03-23 15:48:04 +00:00
Benjamin Kramer
f2e4b5dd7f
str[r]chr returns its pointer argument so we cannot mark it as nocapture. Thanks to Duncan for spotting my mistake.
...
llvm-svn: 98671
2010-03-16 20:33:15 +00:00
Benjamin Kramer
5cf5fd2ffa
Mark str[r]chr readonly.
...
llvm-svn: 98663
2010-03-16 19:36:43 +00:00
Eric Christopher
a7fb58f5f5
Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
...
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.
llvm-svn: 97875
2010-03-06 10:50:38 +00:00
Eric Christopher
87abfc506f
Move SimplifyLibCalls's LibCall builders to a separate file so they
...
can be used in more places. Add an argument for the TargetData that
most of them need. Update for the getInt8PtrTy() change. Should be
no functionality change.
llvm-svn: 97844
2010-03-05 22:25:30 +00:00
Evan Cheng
d214ed0e75
Safely turn memset_chk etc. to non-chk variant if the known object size is >= memset / memcpy / memmove size.
...
llvm-svn: 97828
2010-03-05 20:59:47 +00:00
Eric Christopher
4899cbc77d
Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
...
No functionality change.
llvm-svn: 97793
2010-03-05 06:58:57 +00:00
Duncan Sands
19d0b47b1f
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Duncan Sands
9dff9bec31
Uniformize the names of type predicates: rather than having isFloatTy and
...
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Eric Christopher
d86233c118
Recommit this, looks like it wasn't the cause.
...
llvm-svn: 95165
2010-02-03 00:21:58 +00:00
Eric Christopher
e67d01a9a8
Hopefully temporarily revert this.
...
llvm-svn: 95154
2010-02-02 23:01:31 +00:00
Eric Christopher
4264e7e46f
Re-add strcmp and known size object size checking optimization.
...
Passed bootstrap and nightly test run here.
llvm-svn: 95145
2010-02-02 22:10:43 +00:00
Eric Christopher
14dfc3f6df
Don't need to check the last argument since it'll always be bool. We also
...
don't use TargetData here.
llvm-svn: 95040
2010-02-02 00:51:45 +00:00
Eric Christopher
9afa973203
More indentation/tabification fixes.
...
llvm-svn: 95036
2010-02-02 00:13:06 +00:00
Eric Christopher
1408234753
Untabify previous commit.
...
llvm-svn: 95035
2010-02-02 00:06:55 +00:00
Eric Christopher
56e4182c49
Formatting.
...
llvm-svn: 95027
2010-02-01 23:25:03 +00:00
Eric Christopher
5a0e174863
Revert my last couple of patches. They appear to have broken bison.
...
llvm-svn: 94841
2010-01-29 21:16:24 +00:00
Eric Christopher
9b3c02b7da
Make strcpy_chk lower to strcpy if we have a safe size.
...
llvm-svn: 94783
2010-01-29 01:37:11 +00:00
Eric Christopher
ba7cd4c393
Reapply 94059 while fixing the calling convention setup
...
for strcpy.
llvm-svn: 94287
2010-01-23 05:29:06 +00:00
Bob Wilson
6c0c8d41b4
Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bison
...
test on ARM.
llvm-svn: 94198
2010-01-22 19:16:40 +00:00
Eric Christopher
fa863258d0
Add strcpy_chk -> strcpy support for "don't know" object size
...
answers. This will update as object size checking gets better information.
llvm-svn: 94059
2010-01-21 01:04:38 +00:00
Eric Christopher
2cdb806fd8
Move the object size intrinsic optimization to inst-combine and make
...
it work for any integer size return type.
llvm-svn: 92853
2010-01-06 20:04:44 +00:00
Mikhail Glushenkov
40d2429b28
Formatting.
...
llvm-svn: 92831
2010-01-06 09:20:39 +00:00
Benjamin Kramer
d2564e3afb
Move remaining stuff to the isInteger predicate.
...
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
David Greene
9ddc6e2e12
Change errs() to dbgs().
...
llvm-svn: 92615
2010-01-05 01:27:21 +00:00
Mikhail Glushenkov
6a8ac8ce8f
80-col violations, trailing whitespace.
...
llvm-svn: 92470
2010-01-04 07:55:25 +00:00
Chris Lattner
1a32ede6fd
move an optimization for memcmp out of simplifylibcalls and into
...
SDISel. This optimization was causing simplifylibcalls to
introduce type-unsafe nastiness. This is the first step, I'll be
expanding the memcmp optimizations shortly, covering things that
we really really wouldn't want simplifylibcalls to do.
llvm-svn: 92098
2009-12-24 00:37:38 +00:00
Chris Lattner
efebb234b7
reorder to follow a normal fall-through style, no functionality change.
...
llvm-svn: 92084
2009-12-23 23:24:51 +00:00
Eric Christopher
fdb33458fc
Update objectsize intrinsic and associated dependencies. Fix
...
lowering code and update testcases.
llvm-svn: 91979
2009-12-23 02:51:48 +00:00
Eric Christopher
ab6a0d60d5
Whitespace fixes.
...
llvm-svn: 91875
2009-12-22 01:23:51 +00:00
Chris Lattner
f278addbdc
reapply my strstr optimization. I have reproduced the x86-64 bootstrap
...
miscompile (i386.o miscompares) but it happens both with and without
this patch.
llvm-svn: 91532
2009-12-16 09:32:05 +00:00
Chris Lattner
177be32334
revert my strstr optimization, I'm told it breaks x86-64 bootstrap.
...
Will reapply with a fix when I get a chance.
llvm-svn: 91486
2009-12-16 00:46:02 +00:00
Chris Lattner
26ab363361
optimize strstr, PR5783
...
llvm-svn: 91438
2009-12-15 19:14:40 +00:00
Chris Lattner
24aba42d04
add some other xforms that should be done as part of PR5783
...
llvm-svn: 91428
2009-12-15 09:05:13 +00:00
Chris Lattner
eea42c7b51
tidy up, remove dependence on order of evaluation of function args from EmitMemCpy.
...
llvm-svn: 90297
2009-12-02 06:05:42 +00:00
Eric Christopher
0c7bd96de2
Add more optimizations for object size checking, enable handling of
...
object size intrinsic and verify return type is correct. Collect various
code in one place.
llvm-svn: 89523
2009-11-21 01:01:30 +00:00
Daniel Dunbar
f87c75706f
Revert "Add some rough optimizations for checking routines.", it buildeth not.
...
llvm-svn: 89482
2009-11-20 20:17:30 +00:00
Eric Christopher
cf97d01dff
Add some rough optimizations for checking routines.
...
llvm-svn: 89479
2009-11-20 19:57:37 +00:00