Chad Rosier
c5fa9f413a
Add support for sqrt, sqrtl, and sqrtf in TargetLibraryInfo. Disable
...
(fptrunc (sqrt (fpext x))) -> (sqrtf x) transformation if -fno-builtin is
specified.
rdar://10466410
llvm-svn: 145460
2011-11-29 23:57:10 +00:00
Chad Rosier
0ff2f46d12
If fast-isel fails, remove dead instructions generated during the failed
...
attempt.
llvm-svn: 145425
2011-11-29 19:40:47 +00:00
Michael J. Spencer
5fade79478
MC/X86/COFF: Allow quotes in names when targeting MS/Windows,
...
as MC is the only assembler we support.
This splits MS/Windows and GNU/Windows ASM infos into two seperate classes.
While there is currently only one difference, full MS C++ ABI support will
require many more.
llvm-svn: 145409
2011-11-29 18:00:06 +00:00
Danil Malyshev
5ce4e1a9d3
Fixed ObjectFile functions:
...
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.
llvm-svn: 145408
2011-11-29 17:40:10 +00:00
Daniel Dunbar
7e05a207c4
llvm-c: Add a few missing InitializeAll* functions.
...
llvm-svn: 145330
2011-11-29 00:06:55 +00:00
Bill Wendling
8beab76b07
Remove dead llvm.eh.sjlj.dispatchsetup intrinsic.
...
llvm-svn: 145263
2011-11-28 19:23:13 +00:00
Andrew Trick
8c051c1949
Remove the temporary flag -disable-unroll-scev and dead code.
...
SCEV should now be used for trip count analysis, not LoopInfo.
llvm-svn: 145262
2011-11-28 19:22:09 +00:00
Benjamin Kramer
a41c3f4eff
Handle more cases in APInt::getLowBitsSet's fast path.
...
llvm-svn: 145249
2011-11-28 16:56:38 +00:00
NAKAMURA Takumi
1e7305dc9b
configure, config.h.in: Regenerate.
...
config.h.cmake: Synchronize to config.h.in.
llvm-svn: 145217
2011-11-28 01:07:19 +00:00
Dylan Noblesmith
d467aafd26
use llvm-config.h in public header
...
The config.h file's macros collide with other projects that include
LLVM and shouldn't get exported.
llvm-svn: 145215
2011-11-28 00:49:01 +00:00
Dylan Noblesmith
9751c17d0d
rename ENABLE_THREADS to LLVM_ENABLE_THREADS
...
Now that it needs to be exported in a public header (Valgrind.h)
it should be prefixed to avoid collision with other projects.
Add it to llvm-config.h as well.
This'll require regenerating the configure script after this
commit, but I don't have the required autoconf version.
llvm-svn: 145214
2011-11-28 00:48:58 +00:00
Dylan Noblesmith
d438218614
update description of LLVM_DEFAULT_TARGET_TRIPLE
...
It was out of sync with the description in configure.ac/config.h.in.
Also re-alphabetize it from its position when it was LLVM_HOST_TRIPLE.
llvm-svn: 145213
2011-11-28 00:48:53 +00:00
Chandler Carruth
e5e455c97f
Revert r145180 as it is causing test failures on all the bots.
...
Original commit message:
Fixed ObjectFile functions:
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.
llvm-svn: 145182
2011-11-27 10:37:47 +00:00
Danil Malyshev
3bbe062799
Fixed ObjectFile functions:
...
- getSymbolOffset() renamed as getSymbolFileOffset()
- getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile.
- added getRelocationOffset()
- fixed MachOObjectFile::getSymbolSize()
- fixed MachOObjectFile::getSymbolSection()
- fixed MachOObjectFile::getSymbolOffset() for symbols without section data.
llvm-svn: 145180
2011-11-27 10:12:52 +00:00
Chris Lattner
011a5bf0aa
remove autoupgrade support for really old-style debug info intrinsics.
...
I think this is the last of autoupgrade that can be removed in 3.1.
Can the atomic upgrade stuff also go?
llvm-svn: 145169
2011-11-27 06:18:33 +00:00
Chris Lattner
321e2eedcc
remove autoupgrade support for LLVM 2.9 exception stuff. Mainline supports
...
LLVM 3.0 and later.
llvm-svn: 145165
2011-11-27 05:56:16 +00:00
Chris Lattner
03be469732
remove support for reading llvm 2.9 .bc files. LLVM 3.1 is only compatible back to 3.0
...
llvm-svn: 145164
2011-11-27 05:48:27 +00:00
Bruno Cardoso Lopes
626d04cc6f
This patch contains support for encoding FMA4 instructions and
...
tablegen patterns for scalar FMA4 operations and intrinsic. Also
add tests for vfmaddsd.
Patch by Jan Sjodin
llvm-svn: 145133
2011-11-25 19:33:42 +00:00
Benjamin Kramer
4fab3375a7
Devirtualize Pass::getPassID, overriding it isn't useful and it gets called a lot.
...
While at it pull the trivial ctor in line.
llvm-svn: 145124
2011-11-24 21:14:11 +00:00
Akira Hatanaka
9071684dcf
This patch addresses gp relative fixups/relocations for jump tables.
...
llvm-svn: 145112
2011-11-23 22:18:04 +00:00
Benjamin Kramer
7120c3ef01
Add configure checking for pread(2) and use it to save a syscall when reading files.
...
llvm-svn: 145061
2011-11-22 12:31:53 +00:00
Sebastian Pop
d35ee1a61a
fix typo in comment
...
llvm-svn: 145048
2011-11-21 20:46:55 +00:00
Nick Lewycky
1eb3e73f1d
Add virtual destructor. Whoops!
...
llvm-svn: 145044
2011-11-21 18:32:21 +00:00
Nick Lewycky
5cadaed864
Less template, more virtual! Refactoring suggested by Chris in code review.
...
llvm-svn: 145014
2011-11-20 19:37:06 +00:00
Nick Lewycky
39c6f0a5d5
Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.
...
Suggested in code review by Eli.
That code in InstCombine looks kinda suspicious.
llvm-svn: 145013
2011-11-20 19:09:04 +00:00
Chandler Carruth
f191cab95f
Make an obviously const interface actually be marked as const.
...
llvm-svn: 145009
2011-11-20 11:22:03 +00:00
Devang Patel
a0973b0c53
DISubrange supports unsigned lower/upper array bounds, so let's not fake it in the end while emitting DWARF. If a FE needs to encode signed lower/upper array bounds then we need to extend DISubrange or ad DISignedSubrange.
...
llvm-svn: 144937
2011-11-17 23:43:15 +00:00
Ted Kremenek
5b61764405
Fix bug in RefCountedBase/RefCountedBaseVPTR where the reference count was accidentally copied as part of the copy constructor. This could result in objects getting leaked because there reference count was too high.
...
llvm-svn: 144931
2011-11-17 23:02:14 +00:00
Eli Friedman
d02d82d355
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
Evan Cheng
2b239cbcf6
Sink codegen optimization level into MCCodeGenInfo along side relocation model
...
and code model. This eliminates the need to pass OptLevel flag all over the
place and makes it possible for any codegen pass to use this information.
llvm-svn: 144788
2011-11-16 08:38:26 +00:00
Michael J. Spencer
d410d36be0
Remove extra ,.
...
llvm-svn: 144759
2011-11-16 01:36:50 +00:00
Kostya Serebryany
4105068ea9
AddressSanitizer, first commit (compiler module only)
...
llvm-svn: 144758
2011-11-16 01:35:23 +00:00
Michael J. Spencer
8e33446699
Object/Archive: Give Child a operator < for map.
...
llvm-svn: 144757
2011-11-16 01:25:13 +00:00
Michael J. Spencer
796bb719a3
Support/COFF: Add structs and enums from the standard for image files.
...
llvm-svn: 144756
2011-11-16 01:24:57 +00:00
Owen Anderson
48a129b50e
Rename MVT::untyped to MVT::Untyped to match similar nomenclature.
...
llvm-svn: 144747
2011-11-16 01:02:57 +00:00
Benjamin Kramer
4a8534a158
StringRefize and simplify.
...
llvm-svn: 144675
2011-11-15 19:12:09 +00:00
Benjamin Kramer
ea43fbc528
Remove Value::getNameStr. It has been deprecated for a while and provides no additional value over getName().
...
llvm-svn: 144657
2011-11-15 18:30:12 +00:00
Benjamin Kramer
de467fc4df
Missed some users of Value::getNameStr.
...
llvm-svn: 144656
2011-11-15 18:30:06 +00:00
Benjamin Kramer
a2f57dee6d
Remove all remaining uses of Value::getNameStr().
...
llvm-svn: 144648
2011-11-15 16:27:03 +00:00
Benjamin Kramer
3eeef2e739
Twinify GraphWriter a little bit.
...
llvm-svn: 144647
2011-11-15 16:26:38 +00:00
NAKAMURA Takumi
c26f35afea
include/llvm/Support/Compiler.h: Invalidate LLVM_ATTRIBUTE_WEAK on cygming for now.
...
It triggers generating insane executables with both binutils-2.19.1(msysgit) and 2.22.51.20111013(cygwin).
llvm-svn: 144621
2011-11-15 05:24:26 +00:00
Nick Lewycky
3858fb95b7
Move WEAK marking to the declaration.
...
llvm-svn: 144603
2011-11-15 01:23:22 +00:00
Jakob Stoklund Olesen
2709f65821
Break false dependencies before partial register updates.
...
Two new TargetInstrInfo hooks lets the target tell ExecutionDepsFix
about instructions with partial register updates causing false unwanted
dependencies.
The ExecutionDepsFix pass will break the false dependencies if the
updated register was written in the previoius N instructions.
The small loop added to sse-domains.ll runs twice as fast with
dependency-breaking instructions inserted.
llvm-svn: 144602
2011-11-15 01:15:30 +00:00
Nick Lewycky
a68ade6ccc
Fix linking for some users who already have tsan enabled code and are trying to
...
link it against llvm code, by making our definitions weak. "Some users."
llvm-svn: 144596
2011-11-15 00:14:04 +00:00
Nick Lewycky
a0b2f7ca1d
Refactor capture tracking (which already had a couple flags for whether returns
...
and stores capture) to permit the caller to see each capture point and decide
whether to continue looking.
Use this inside memdep to do an analysis that basicaa won't do. This lets us
solve another devirtualization case, fixing PR8908!
llvm-svn: 144580
2011-11-14 22:49:42 +00:00
Nick Lewycky
53185e9016
Add support for tsan annotations (thread sanitizer, a valgrind-based tool).
...
These annotations are disabled entirely when either ENABLE_THREADS is off, or
building a release build. When enabled, they add calls to functions with no
statements to ManagedStatic's getters.
Use these annotations to inform tsan that the race used inside ManagedStatic
initialization is actually benign. Thanks to Kostya Serebryany for helping
write this patch!
llvm-svn: 144567
2011-11-14 20:50:16 +00:00
Benjamin Kramer
720b712c77
Fold ConstantVector::isAllOnesValue into Constant::isAllOnesValue and simplify it.
...
llvm-svn: 144555
2011-11-14 19:12:20 +00:00
Benjamin Kramer
bff5aaee3f
Make headers standalone.
...
llvm-svn: 144537
2011-11-14 17:45:03 +00:00
Benjamin Kramer
6d85bbc486
Make headers standalone, move a virtual method out of line.
...
llvm-svn: 144536
2011-11-14 17:22:45 +00:00
Chandler Carruth
f89087744e
Under the hood, MBPI is doing a linear scan of every successor every
...
time it is queried to compute the probability of a single successor.
This makes computing the probability of every successor of a block in
sequence... really really slow. ;] This switches to a linear walk of the
successors rather than a quadratic one. One of several quadratic
behaviors slowing this pass down.
I'm not really thrilled with moving the sum code into the public
interface of MBPI, but I don't (at the moment) have ideas for a better
interface. My direction I'm thinking in for a better interface is to
have MBPI actually retain much more state and make *all* of these
queries cheap. That's a lot of work, and would require invasive changes.
Until then, this seems like the least bad (ie, least quadratic)
solution. Suggestions welcome.
llvm-svn: 144530
2011-11-14 09:12:57 +00:00