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
a47a6fc91b
Fix a typo.
...
llvm-svn: 143890
2011-11-06 20:36:50 +00:00
Daniel Dunbar
7b66487335
ADT/StringRef: Add ::lower() and ::upper() methods.
...
llvm-svn: 143880
2011-11-06 18:04:43 +00:00
Peter Collingbourne
6ec231f82f
Return only the least significant 8 bits of the exit status from
...
Process::Wait on Windows (mimicing POSIX behaviour).
llvm-svn: 143876
2011-11-06 16:45:46 +00:00
Benjamin Kramer
3c2ba1a51a
Add more PRI.64 macros for MSVC and use them throughout the codebase.
...
llvm-svn: 143799
2011-11-05 08:57:40 +00:00
Daniel Dunbar
3760ebeebb
build: Add initial cut at LLVMBuild.txt files.
...
llvm-svn: 143634
2011-11-03 18:53:17 +00:00
Sebastian Pop
f72a853709
rename getHostTriple into getDefaultTargetTriple
...
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Sebastian Pop
69b2b86143
rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE
...
llvm-svn: 143501
2011-11-01 21:31:44 +00:00
Eli Friedman
62794425dd
Remove a couple unused methods. PR11201.
...
llvm-svn: 143452
2011-11-01 05:11:01 +00:00
Dan Gohman
892b86e74c
Remove the Alpha backend.
...
llvm-svn: 143164
2011-10-27 22:56:32 +00:00
Benjamin Kramer
ad2fb4eeb5
BlockFrequency: Use a smarter overflow check.
...
This trades one 64 bit div for one 64 bit mul and some arithmetic.
llvm-svn: 143106
2011-10-27 16:38:50 +00:00
Dan Gohman
77125e4240
Remove the Blackfin backend.
...
llvm-svn: 142880
2011-10-25 00:05:42 +00:00
Dan Gohman
b54d296fd4
Remove the SystemZ backend.
...
llvm-svn: 142878
2011-10-24 23:48:32 +00:00
NAKAMURA Takumi
679aa96408
Windows/Path.inc: [PR8460] Get rid of ScopedNullTerminator. Thanks to Zvi Rackover!
...
llvm-svn: 142785
2011-10-24 03:27:19 +00:00
Benjamin Kramer
fd11994070
Print branch probabilities as percentages.
...
50% is much more readable than 5.000000e-01.
llvm-svn: 142752
2011-10-23 11:32:54 +00:00
Benjamin Kramer
9adc582e35
Add compare operators to BranchProbability and use it to determine if an edge is hot.
...
llvm-svn: 142751
2011-10-23 11:19:14 +00:00
Anton Korobeynikov
e91e40b137
Fix build on mingw-w64.
...
Patch by Ruben Van Boxem!
llvm-svn: 142646
2011-10-21 09:38:50 +00:00
David Meyer
fd278b1f98
Remove unused include of sys/uio.h in MemoryBuffer.cpp. It was not correctly protected by ifdef either.
...
llvm-svn: 142623
2011-10-20 21:57:46 +00:00
Benjamin Kramer
524eb5859f
Fix handling of the From parameter in StringRef::find.
...
Enable bounds checking to catch this kind of bug earlier.
llvm-svn: 142247
2011-10-17 20:49:40 +00:00
Benjamin Kramer
6009b2df99
Let printf do the formatting instead aligning strings ourselves.
...
While at it, merge some format strings.
llvm-svn: 142140
2011-10-16 16:30:34 +00:00
Chris Lattner
0ab0d49640
remove the dead 'ShowLine' argument from SMDiagnostic.
...
llvm-svn: 142108
2011-10-16 05:47:55 +00:00
Chris Lattner
391d90c9a6
Make SMDiagnostic a little more sane. Instead of passing around note/warning/error as a
...
string, pass it around as an enum.
llvm-svn: 142107
2011-10-16 05:43:57 +00:00
Chris Lattner
321335142c
Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance
...
the X86 asmparser to produce ranges in the one case that was annoying me, for example:
test.s:10:15: error: invalid operand for instruction
movl 0(%rax), 0(%edx)
^~~~~~~
It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use
ranges where appropriate if someone is interested.
llvm-svn: 142106
2011-10-16 04:47:35 +00:00
Benjamin Kramer
0c20486517
Add a bad char heuristic to StringRef::find.
...
Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of
uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways.
The worst case is still O(n*m) but we do a lot better on the average case now.
llvm-svn: 142061
2011-10-15 10:08:31 +00:00
NAKAMURA Takumi
f7ee2603c2
Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple"
...
It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects.
By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-".
llvm-svn: 142055
2011-10-15 04:29:36 +00:00
Chad Rosier
6e6dd4880b
Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple
...
from config.h, it discovers the triple based on the execution environment.
Patch by Aaron Ballman <aaron@aaronballman.com>
llvm-svn: 142046
2011-10-15 02:10:06 +00:00
NAKAMURA Takumi
88ad0d5a50
Windows/Memory.inc: Support the ability to allocate memory "near" another block of memory on Win32. It has fixed FIXME.
...
Thanks to Aaron Ballman!
llvm-svn: 142039
2011-10-15 01:58:16 +00:00
Michael J. Spencer
5cbe7170de
Support/Windows: Add support modifying memory permissions on Windows. Patch by Aaron Ballman!
...
llvm-svn: 141910
2011-10-13 23:16:01 +00:00
Michael J. Spencer
1c388c42ea
Support/Windows: Add efficent RW mutex on Windows. Patch by Aaron Ballman!
...
llvm-svn: 141907
2011-10-13 23:10:56 +00:00
Eli Friedman
a1d8196452
Avoid undefined behavior in signed integer negation. Patch by Ahmed Charles.
...
llvm-svn: 141905
2011-10-13 22:49:56 +00:00
Eli Friedman
d9ebbc6cf5
Fix APFloat::getSmallestNormalized so the shift doesn't depend on undefined behavior. Patch from Ahmed Charles.
...
llvm-svn: 141818
2011-10-12 21:56:19 +00:00
Eli Friedman
cda27f4c18
Fix APFloat::getLargest so that it actually returns the correct value. Found by accident while reviewing a patch to nearby code.
...
llvm-svn: 141816
2011-10-12 21:51:36 +00:00
Daniel Dunbar
48c24625fe
Clean up a few references to System/. We still have docs/SystemLibrary.html
...
lying around...
llvm-svn: 141703
2011-10-11 20:02:52 +00:00
Bruno Cardoso Lopes
fa8f5fb2cf
The Mips specific function for instruction cache invalidation cannot be
...
compiled on mips32r1 processors because it uses synci and rdhwr instructions
which are supported only on mips32r2, so I replaced this function with the
call to function cacheflush which works for both mips32r1 and mips32r2.
Patch by Sasa Stankovic
llvm-svn: 141564
2011-10-10 18:41:02 +00:00
Eli Friedman
433785c651
Fix APInt::operator*= so that it computes the correct result for large integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086.
...
llvm-svn: 141441
2011-10-07 23:40:49 +00:00
Eric Christopher
29ebd25c99
Add more initializers to quiet a clang warning.
...
llvm-svn: 141163
2011-10-05 05:00:26 +00:00
Nick Lewycky
e394c128ac
Fix typo in comments.
...
llvm-svn: 141032
2011-10-03 21:30:08 +00:00
Michael J. Spencer
2a1d60faf5
Add Windows x64 stack walking support. Patch by Aaron Ballman!
...
llvm-svn: 140906
2011-10-01 00:05:20 +00:00
Jakob Stoklund Olesen
783b18e818
Fix a bug in compare_numeric().
...
Thanks to Alexandru Dura and Jonas Paulsson for finding it.
llvm-svn: 140859
2011-09-30 17:03:55 +00:00
Chad Rosier
e9cf87d911
These symbols appear to be visible by SearchForAddressOfSymbol and no longer
...
require special case handling.
rdar://10117377
llvm-svn: 140629
2011-09-27 20:01:41 +00:00
Daniel Dunbar
599366dcae
sys::Process: Add a SetWorkingDirectory method.
...
llvm-svn: 140433
2011-09-23 23:23:36 +00:00
Richard Trieu
a675de9fac
Change:
...
assert(!"error message");
To:
assert(0 && "error message");
which is more consistant across the code base.
llvm-svn: 140234
2011-09-21 03:09:09 +00:00
Bob Wilson
817b059c93
Remove the hack to check UNAME_RELEASE when identifying the Darwin version.
...
This was only needed to locate llvm-gcc's installation directory when clang
falls back to run llvm-gcc for i386 kexts. As of clang svn r140187, we're
now just searching paths with several different Darwin versions on either
side of the current version, so this is no longer needed.
llvm-svn: 140188
2011-09-20 22:05:56 +00:00
Douglas Gregor
0b34adbbaf
U is good enough
...
llvm-svn: 140166
2011-09-20 18:33:29 +00:00
Douglas Gregor
669f1d1953
Eliminate sign-comparison warnings in APInt
...
llvm-svn: 140158
2011-09-20 18:11:52 +00:00
Akira Hatanaka
795050d1d1
Add mips64 & mips64el to Triple. Patch by Liu with modifications.
...
llvm-svn: 140157
2011-09-20 18:09:37 +00:00
Eric Christopher
9f7d25652d
Rename LLVM_MULTITHREADED define and fix build without threads.
...
Patch by Arrowdodger.
llvm-svn: 140064
2011-09-19 20:43:23 +00:00
Benjamin Kramer
f2e726fe00
Silence -Wsign-compare warnings from GCC.
...
llvm-svn: 140043
2011-09-19 20:08:54 +00:00
NAKAMURA Takumi
6171669218
Add Win32 support to llvm::llvm_execute_on_thread(). Thanks to Aaron Ballman!
...
llvm-svn: 140011
2011-09-19 07:41:43 +00:00
Eli Friedman
de552b5c18
Fix a minor bug in fs::create_directories. Patch by Albert Wong.
...
llvm-svn: 139928
2011-09-16 18:36:31 +00:00