Nick Lewycky
a8e84fb56b
Turn cos(-x) into cos(x). Patch by Alexander Malyshev!
...
llvm-svn: 147291
2011-12-27 18:25:50 +00:00
Benjamin Kramer
f1fd6e394d
Give string constants generated by IRBuilder private linkage.
...
Fixes PR11640.
llvm-svn: 147144
2011-12-22 14:22:14 +00:00
Joerg Sonnenberger
45c4164166
Only replace fwrite with fputc, if the return value is unused.
...
llvm-svn: 146411
2011-12-12 20:18:31 +00:00
Eli Friedman
489c0ff4a4
Add support for custom names for library functions in TargetLibraryInfo. Add a custom name for fwrite and fputs on x86-32 OSX. Make SimplifyLibCalls honor the custom
...
names for fwrite and fputs.
Fixes <rdar://problem/9815881>.
llvm-svn: 144876
2011-11-17 01:27:36 +00:00
Benjamin Kramer
594ee77964
SimplifyLibCalls: Use IRBuilder.CreateGlobalString when creating a string for printf->puts, which correctly sets the unnamed_addr bit on the resulting GlobalVariable.
...
Fixes PR11264.
llvm-svn: 143289
2011-10-29 19:43:31 +00:00
Nick Lewycky
462098824f
"@string = constant i8 0" is a value i8* string of length zero. Analyze that
...
correctly in GetStringLength, fixing PR11181!
llvm-svn: 142558
2011-10-20 00:34:35 +00:00
Lang Hames
e7594abd87
Fixed quoting on default data layout option.
...
llvm-svn: 142286
2011-10-17 21:54:43 +00:00
Eli Friedman
3e3aecbc2c
PR11061: Make simplifylibcalls fold strcmp("", x) correctly.
...
While I'm here, fix the related issue with strncmp, add some actual tests for strcmp and strncmp, and start using StringRef::compare for constant folding instead of using strcmp/strncmp so that the optimized IR isn't dependent on the host's implementation of strcmp.
llvm-svn: 141227
2011-10-05 22:27:16 +00:00
Benjamin Kramer
547b6c5ecd
Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit.
...
If someone prefers %tmp42 to %42, run instnamer.
llvm-svn: 140634
2011-09-27 20:39:19 +00:00
Eli Friedman
02e737b08e
Move "atomic" and "volatile" designations on instructions after the opcode
...
of the instruction.
Note that this change affects the existing non-atomic load and store
instructions; the parser now accepts both forms, and the change is noted
in the release notes.
llvm-svn: 137527
2011-08-12 22:50:01 +00:00
Chris Lattner
80ed9dc9e5
rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is
...
for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the
target indep prefetch change.
As usual, updating the testsuite is a PITA.
llvm-svn: 133337
2011-06-18 06:05:24 +00:00
Devang Patel
13f8c7d48e
Preserve line number information while simplifying libcalls.
...
llvm-svn: 127362
2011-03-09 21:27:52 +00:00
Richard Osborne
af52c52569
Optimize fprintf -> iprintf if there are no floating point arguments
...
and siprintf is available on the target.
llvm-svn: 126940
2011-03-03 14:20:22 +00:00
Richard Osborne
2dfb888392
Optimize sprintf -> siprintf if there are no floating point arguments
...
and siprintf is available on the target.
llvm-svn: 126937
2011-03-03 14:09:28 +00:00
Richard Osborne
815de536e5
Optimize printf -> iprintf if there are no floating point arguments
...
and iprintf is available on the target. Currently iprintf is only
marked as being available on the XCore.
llvm-svn: 126935
2011-03-03 13:17:51 +00:00
Dan Gohman
6564ca0c23
Delete obsolete test.
...
llvm-svn: 126680
2011-02-28 19:58:14 +00:00
Daniel Dunbar
210ce0feb5
SimplifyLibCalls: Add missing legalize check on various printf to puts and
...
putchar transforms, their return values are not compatible.
llvm-svn: 125442
2011-02-12 18:19:57 +00:00
Daniel Dunbar
76c95562bc
tests: FileCheckize
...
llvm-svn: 125441
2011-02-12 18:19:53 +00:00
Dan Gohman
93dc2b808f
Revert r64460. strtol and friends cannot be marked readonly, even with
...
a null endptr argument, because they may write to errno.
This fixes a seflhost miscompile observed on Linux targets when TBAA
was enabled.
llvm-svn: 122014
2010-12-17 01:09:43 +00:00
Anders Carlsson
e3ea1cba79
Add a puts optimization that converts puts() to putchar('\n').
...
llvm-svn: 120398
2010-11-30 06:19:18 +00:00
Anders Carlsson
77e9892afd
Fix a typo.
...
llvm-svn: 120394
2010-11-30 06:03:55 +00:00
Anders Carlsson
631d06bbce
Rename this test to FPuts.ll since it actually tests fputs.
...
llvm-svn: 120393
2010-11-30 05:59:26 +00:00
Benjamin Kramer
e6840ef4b3
Fix some broken CHECK lines.
...
llvm-svn: 120332
2010-11-29 22:34:55 +00:00
NAKAMURA Takumi
959807fa37
test/Transforms/SimplifyLibCalls/floor.ll: Mark as XFAIL:win32 due to lack of nearbyintf on MSVC. [PR8466]
...
llvm-svn: 117529
2010-10-28 06:46:04 +00:00
Benjamin Kramer
2b76c66fd6
Add constant folding for strspn and strcspn to SimplifyLibCalls.
...
llvm-svn: 115116
2010-09-30 00:58:35 +00:00
Benjamin Kramer
38d22f69fc
Add strpbrk folding to SimplifyLibCalls.
...
llvm-svn: 115111
2010-09-29 23:52:12 +00:00
Benjamin Kramer
8e861d7eee
Simplify the loop in StrChrOptimizer. FileCheckize test.
...
llvm-svn: 115095
2010-09-29 22:29:12 +00:00
Benjamin Kramer
824645abc9
Teach SimplifyLibCalls how to optimize strrchr.
...
llvm-svn: 115091
2010-09-29 21:50:51 +00:00
Rafael Espindola
a20e2dfe86
Make sure that simplify libcalls does not replace a call with one calling
...
convention with a new call with a different calling convention.
llvm-svn: 106134
2010-06-16 19:34:01 +00:00
Benjamin Kramer
a13bd20396
simplify-libcalls: fold strncmp(x, y, 1) -> memcmp(x, y, 1)
...
The memcmp will be optimized further and even the pathological case
'strstr(x, "x") == x' generates optimal code now.
llvm-svn: 106097
2010-06-16 10:30:29 +00:00
Benjamin Kramer
1118860e3a
simplify-libcalls: fold strstr(a, b) == a -> strncmp(a, b, strlen(b)) == 0
...
llvm-svn: 106047
2010-06-15 21:34:25 +00:00
Nick Lewycky
aee2632be3
The memcpy intrinsic only takes i8* for %src and %dst, so cast them to that
...
first. Fixes PR7265.
llvm-svn: 105206
2010-05-31 06:16:35 +00:00
Benjamin Kramer
9439084cea
Properly promote operands when optimizing a single-character memcmp.
...
llvm-svn: 104648
2010-05-25 22:53:43 +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
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
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
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
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
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
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
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
Benjamin Kramer
b971445ab7
Teach SimplifyLibCalls to fold memcmp calls with constant arguments.
...
llvm-svn: 86141
2009-11-05 17:44:22 +00:00
Dan Gohman
62995c71a2
Fix SimplifyLibCalls to transfer attributes from callees rather than
...
calls, since direct calls don't always reflect the attributes of their
callees.
llvm-svn: 82867
2009-09-26 18:10:13 +00:00
Dan Gohman
48f7da742a
I put the wrong rdar number in this test.
...
llvm-svn: 82829
2009-09-26 01:11:57 +00:00
Dan Gohman
5ffd53892d
Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which is
...
typically faster then doing a general pow.
llvm-svn: 82819
2009-09-25 23:10:17 +00:00
Dan Gohman
1880092722
Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
...
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.
llvm-svn: 81537
2009-09-11 18:01:28 +00:00
Dan Gohman
72a13d2476
Use opt -S instead of piping bitcode output through llvm-dis.
...
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman
9737a63ed8
Change these tests to feed the assembly files to opt directly, instead
...
of using llvm-as, now that opt supports this.
llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Daniel Dunbar
b9ea94c990
Eliminate uses of %prcontext.
...
- I'd appreciate it if someone else eyeballs my changes to make sure I captured
the intent of the test.
llvm-svn: 81083
2009-09-05 11:35:16 +00:00
Chris Lattner
27266f164f
In C++, code is not allowed to call main. In C it is, this
...
simplifylibcalls optimization is thus valid for C++ but not C.
It's not important enough to worry about for C++ apps, so just
remove it.
rdar://7191924
llvm-svn: 80887
2009-09-03 05:19:59 +00:00
Dan Gohman
6e32e5cf0c
Add targetdata strings to these tests, since SimplifyLibCalls uses
...
TargetData to find the pointer size.
llvm-svn: 79490
2009-08-19 23:18:49 +00:00
Dan Gohman
dea2358c68
Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
...
before performing optimizations based on constant string values.
llvm-svn: 79384
2009-08-19 00:11:12 +00:00
Daniel Dunbar
98ddd164d8
Fix PR4645 which was fallout from the fix for PR4641.
...
- Call RAUW to delete all instructions (this is a patch from Nick Lewycky).
llvm-svn: 77512
2009-07-29 22:00:43 +00:00
Nick Lewycky
013c8e5474
Just discard the output, no need to turn it back into text.
...
llvm-svn: 77439
2009-07-29 06:14:52 +00:00
Chris Lattner
1d3defa392
don't dump .bc file to stdout, and simplify this to a trivial testcase.
...
llvm-svn: 77436
2009-07-29 05:32:07 +00:00
Nick Lewycky
f82326b984
Bulk erasing instructions without RAUWing them is unsafe. Instead, break them
...
into a new BB that has no predecessors.
llvm-svn: 77433
2009-07-29 05:17:50 +00:00
Eli Friedman
ff9bf97ceb
Fix simplifylibcalls memset recognition to work on 64-bit platforms
...
where int is 32 bits.
llvm-svn: 76293
2009-07-18 08:34:51 +00:00
Chris Lattner
87a222c5c8
part of PR4405: disable a contentious optimization for
...
strcmp -> memcmp when the lengths of the strings are unknown.
Patch by Nick Lewycky!
llvm-svn: 73751
2009-06-19 04:17:36 +00:00
Dan Gohman
a5b9645c4b
Split the Add, Sub, and Mul instruction opcodes into separate
...
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt
llvm-svn: 72897
2009-06-04 22:49:04 +00:00
Chris Lattner
221895303c
fix PR4284, a bug in simplifylibcalls handling memcmp. Patch by
...
Benjamin Kramer!
llvm-svn: 72625
2009-05-30 18:43:04 +00:00
Chris Lattner
7e335a763a
Fix PR4206 - crash in simplify lib calls
...
llvm-svn: 71644
2009-05-13 06:26:11 +00:00
Chris Lattner
91b6af24ac
add some optimizations for strncpy/strncat and factor some
...
code. Patch by Benjamin Kramer!
llvm-svn: 68885
2009-04-12 05:06:39 +00:00
Ed Schouten
01aa6ec97a
Let the strcat optimizer return the pointer to the start of the buffer,
...
instead of the place where it started to perform the string copy.
- PR3661
- Patch by Benjamin Kramer!
llvm-svn: 68443
2009-04-06 13:06:48 +00:00
Nick Lewycky
d234a845f9
Mark strto* as readonly when the endptr is null.
...
llvm-svn: 64460
2009-02-13 17:08:33 +00:00
Nick Lewycky
a0e83a0952
On strtod and friends, mark 'endptr' nocapture in the function prototype, and
...
mark the first argument nocapture if endptr=NULL for each particular call.
llvm-svn: 64453
2009-02-13 15:31:46 +00:00
Nick Lewycky
cdccffe731
Reapply r64300:
...
Make sure the SCC pass manager initializes any contained
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
llvm-svn: 64443
2009-02-13 07:15:53 +00:00
Bill Wendling
5f14a01340
Revert r64300 and r64301. These were causing the following errors respectively:
...
During llvm-gcc bootstrap:
Undefined symbols:
"llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
"llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1
During an LLVM release build:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction names with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction information with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td assembly writer with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Compiling InstructionCombining.cpp for Release build
if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \
then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans
llvm-svn: 64311
2009-02-11 18:19:24 +00:00
Duncan Sands
003754f656
Make sure the SCC pass manager initializes any contained
...
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
llvm-svn: 64300
2009-02-11 09:58:43 +00:00
Nick Lewycky
e5be1cd635
Forgot this in the previous checkin: fopen now has nocapture, realloc is
...
supposed to take two arguments.
llvm-svn: 62457
2009-01-18 04:46:10 +00:00
Nick Lewycky
959af7ba30
Run a post-pass that marks known function declarations by name.
...
llvm-svn: 61632
2009-01-04 20:27:34 +00:00
Nick Lewycky
10eb8e533f
Turn strcmp into memcmp, such as strcmp(P, "x") --> memcmp(P, "x", 2).
...
llvm-svn: 61297
2008-12-21 00:19:21 +00:00
Eli Friedman
09bc610945
Optimize memmove and memset into the LLVM builtins. Note that these
...
only show up in code from front-ends besides llvm-gcc, like clang.
llvm-svn: 60287
2008-11-30 08:32:11 +00:00
Dan Gohman
8cdea717a3
Add a new pass to simplify specific half_powr function calls. This is
...
a specialized pass that it not likely to be generally useful.
llvm-svn: 58732
2008-11-04 23:41:45 +00:00
Chris Lattner
9c9f531a47
lower calls to abs to inline code, PR2337
...
llvm-svn: 52138
2008-06-09 08:26:51 +00:00
Gabor Greif
1e427c3264
sabre brings to my attention that the 'tr' suffix is also obsolete
...
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif
f45ff35bfe
Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
...
llvm-svn: 51328
2008-05-20 19:52:04 +00:00
Duncan Sands
eec7a3c071
Fix PR2341 - when the length is 4 use an i32 not
...
an i16! Cleaned up trailing whitespace while there.
llvm-svn: 51240
2008-05-19 09:27:24 +00:00
Chris Lattner
5f0563ceb6
strength reduce exp2 into ldexp, rdar://5852514
...
llvm-svn: 50586
2008-05-02 18:43:35 +00:00
Dan Gohman
2cdcf2bd5f
Update old-style syntax in some "not grep" tests.
...
llvm-svn: 50560
2008-05-01 23:50:07 +00:00
Chris Lattner
0ceb8807e2
fix typo
...
llvm-svn: 50519
2008-05-01 06:16:48 +00:00
Chris Lattner
9ad872201b
instcombine does memset optzns.
...
llvm-svn: 50518
2008-05-01 06:16:38 +00:00
Chris Lattner
4add60753b
simplifylibcalls doesn't optimize llvm.memmove, instcombine does.
...
llvm-svn: 50517
2008-05-01 06:14:24 +00:00
Chris Lattner
f5f944aeaa
no reason for simplifylibcalls to simplify intrinsics, instcombine does
...
a fine job.
llvm-svn: 50470
2008-04-30 06:12:15 +00:00
Chris Lattner
4b20032b08
remove redundant check.
...
llvm-svn: 50469
2008-04-30 06:06:37 +00:00
Chris Lattner
802134fc02
Generalize getUnaryFloatFunction to handle any FP unary function, automatically
...
figuring out the suffix to use. implement pow(2,x) -> exp2(x).
llvm-svn: 49437
2008-04-09 17:48:11 +00:00
Chris Lattner
091afc7714
remove capital letter from test name.
...
llvm-svn: 49436
2008-04-09 17:46:36 +00:00
Chris Lattner
b859fb49ed
many cleanups to the pow optimizer. Allow it to handle powf,
...
add support for pow(x, 2.0) -> x*x.
llvm-svn: 49411
2008-04-09 00:07:45 +00:00
Tanya Lattner
5f4b355f20
Remove llvm-upgrade and update tests.
...
llvm-svn: 48137
2008-03-10 07:21:50 +00:00
Dan Gohman
ada7205b76
Convert tests using "grep -c ... | grep ..." to use the count script.
...
llvm-svn: 41100
2007-08-15 13:49:33 +00:00
John Criswell
2660cef6d7
Convert .cvsignore files
...
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Reid Spencer
6e87ec4351
For PR1319:
...
Remove && from the end of the lines to prevent tests from throwing run
lines into the background. Also, clean up places where the same command
is run multiple times by using a temporary file.
llvm-svn: 36142
2007-04-16 17:36:08 +00:00