Chandler Carruth
a699b6a44c
Add support for finding cacheflush on OpenBSD/mips64 platforms.
...
Patch by Brad Smith!
llvm-svn: 163584
2012-09-11 01:17:24 +00:00
Ted Kremenek
0b3e805e4b
Add operator< for FoldingSetNodeID.
...
llvm-svn: 163454
2012-09-08 04:25:29 +00:00
NAKAMURA Takumi
ffa157177e
Whitespace.
...
llvm-svn: 163289
2012-09-06 03:02:56 +00:00
NAKAMURA Takumi
8a54d812c5
Unix/Signals.inc: Fix a typo. Thanks to Dani Berg!
...
llvm-svn: 163288
2012-09-06 03:01:43 +00:00
Evgeniy Stepanov
c439a42649
Fix Android build of gtest and lib/Support.
...
llvm-svn: 163131
2012-09-04 09:14:45 +00:00
Logan Chien
9ab55b8d59
Rename ANDROIDEABI to Android.
...
Most of the code guarded with ANDROIDEABI are not
ARM-specific, and having no relation with arm-eabi.
Thus, it will be more natural to call this
environment "Android" instead of "ANDROIDEABI".
Note: We are not using ANDROID because several projects
are using "-DANDROID" as the conditional compilation
flag.
llvm-svn: 163087
2012-09-02 09:29:46 +00:00
Benjamin Kramer
ffa24e0438
Add some __builtin_expect magic to StringMap.
...
Tombstones and full hash collisions are rare, mark the "empty"
and "no collision" paths as likely. The bug in simplifycfg
that prevented the hints from being picked during selfhost
up was fixed recently :)
llvm-svn: 162874
2012-08-29 22:57:04 +00:00
Benjamin Kramer
bd7f8d0260
Replace the BUILTIN_EXPECT macro with a less horrible LLVM_LIKELY/LLVM_UNLIKELY interface.
...
llvm-svn: 162873
2012-08-29 22:57:00 +00:00
Hal Finkel
b5d177e5b0
Add the Freescale vendor to Triple.
...
Adds the vendor 'fsl' (used by Freescale SDK) to Triple. This will allow
clang support for Freescale cross-compile configurations.
Patch by Tobias von Koch.
llvm-svn: 162726
2012-08-28 02:10:30 +00:00
Richard Smith
228e6d4cf3
Fix integer undefined behavior due to signed left shift overflow in LLVM.
...
Reviewed offline by chandlerc.
llvm-svn: 162623
2012-08-24 23:29:28 +00:00
Richard Smith
156d92037a
Fix undefined behavior (signed integer overflow) when Clang parses a hexfloat with an enormous exponent. Caught by an existing unit test + -ftrapv.
...
llvm-svn: 162505
2012-08-24 00:01:19 +00:00
Richard Smith
24f09cc82d
Reduce alignment of SmallVector<T> to the required amount, rather than forcing 16-byte alignment. This fixes misaligned SmallVector accesses via ExtractValueInst's SmallVector data member.
...
llvm-svn: 162331
2012-08-22 00:11:07 +00:00
Benjamin Kramer
1b07ab51e4
DataExtractor: Fix integer truncation issues in LEB128 extraction.
...
llvm-svn: 162201
2012-08-20 10:52:11 +00:00
Michael J. Spencer
1d2d12deb1
Properly test the LLVM_USE_RVALUE_REFERENCES macro.
...
llvm-svn: 161978
2012-08-15 19:16:27 +00:00
Michael J. Spencer
ef2284fbad
[PathV2] Add mapped_file_region. Implementation for Windows and POSIX.
...
llvm-svn: 161976
2012-08-15 19:05:47 +00:00
Owen Anderson
352dfff447
Fix another roundToIntegral bug where very large values could become infinity. Problem and solution identified by Steve Canon.
...
llvm-svn: 161969
2012-08-15 18:28:45 +00:00
Owen Anderson
be7e297b6d
Fix typo in comment.
...
llvm-svn: 161956
2012-08-15 16:42:53 +00:00
Owen Anderson
1ff74b0d2d
Fix a problem with APFloat::roundToIntegral where it would return incorrect results for negative inputs to trunc. Add unit tests to verify this behavior.
...
llvm-svn: 161929
2012-08-15 05:39:46 +00:00
Owen Anderson
0b35722533
Fix the construction of the magic constant for roundToIntegral to be 64-bit safe. Fixes c-torture/execute/990826-0.c
...
llvm-svn: 161885
2012-08-14 18:51:15 +00:00
Owen Anderson
a40319b7f1
Add a roundToIntegral method to APFloat, which can be parameterized over various rounding modes. Use this to implement SelectionDAG constant folding of FFLOOR, FCEIL, and FTRUNC.
...
llvm-svn: 161807
2012-08-13 23:32:49 +00:00
Joerg Sonnenberger
c0697304c9
stdcxx's cstdio doesn't include stdio.h, but the code using PathV2.inc
...
includes both. Deal with feof and ferror potentially being macros.
llvm-svn: 161658
2012-08-10 10:56:09 +00:00
Eric Christopher
22738d00a3
Add support for the OpenBSD for Bitrig.
...
Patch by David Hill.
llvm-svn: 161344
2012-08-06 20:52:18 +00:00
Nick Kledzik
5fce8c4ffe
Initial commit of new FileOutputBuffer support class.
...
Since the llvm::sys::fs::map_file_pages() support function it relies on
is not yet implemented on Windows, the unit tests for FileOutputBuffer
are currently conditionalized to run only on unix.
llvm-svn: 161099
2012-08-01 02:29:50 +00:00
Chad Rosier
bd9f2ba4d6
Typos.
...
llvm-svn: 160897
2012-07-27 21:41:59 +00:00
Chad Rosier
7c427c40cb
Make comments in Debug.cpp and Debug.h consistent. Rename SetCurrentDebugType;
...
Function names should be camel case, and start with a lower case letter. No
functional change intended.
llvm-svn: 160813
2012-07-26 20:38:52 +00:00
David Blaikie
70fdf72a48
Don't add null characters to the end of the APFloat string buffer.
...
Report/patch inspiration by Olaf Krzikalla.
llvm-svn: 160744
2012-07-25 18:04:24 +00:00
Nuno Lopes
eb9d2755b2
make ConstantRange::zeroExtend() optimal
...
llvm-svn: 160643
2012-07-23 20:33:29 +00:00
Benjamin Kramer
5be8f60126
Remove unused private member variables uncovered by the recent changes to clang's -Wunused-private-field.
...
llvm-svn: 160583
2012-07-20 22:05:57 +00:00
Benjamin Kramer
dfaa0f3a81
Try to unbreak the windows build.
...
llvm-svn: 160567
2012-07-20 19:49:33 +00:00
Daniel Dunbar
c8b8c49d6f
SourceMgr: Use has_colors() instead of just is_displayed() before trying to use
...
color.
llvm-svn: 160559
2012-07-20 18:29:44 +00:00
Daniel Dunbar
04b4583c9b
raw_ostream: Add a has_colors() method.
...
llvm-svn: 160558
2012-07-20 18:29:41 +00:00
Daniel Dunbar
712de82154
Process: Add sys::Process::FileDescriptorHasColors().
...
llvm-svn: 160557
2012-07-20 18:29:38 +00:00
Preston Gurd
8e082688a1
Adds the family codes for the Midview Atom processors so that the
...
Atom buildbot will auto-detect Atom.
llvm-svn: 160521
2012-07-19 19:05:37 +00:00
Nuno Lopes
c14776d406
reimplement truncate() to make it optimal.
...
It is optimal at least up to 7 bits (I've tested all such cases)
This change to truncate() allows a little simplification to the multiplication code,
and it also makes multiplication optimal :)
llvm-svn: 160512
2012-07-19 16:27:45 +00:00
Bill Wendling
318f03f56f
Remove tabs.
...
llvm-svn: 160479
2012-07-19 00:15:11 +00:00
Bill Wendling
2b07965042
Remove tabs.
...
llvm-svn: 160476
2012-07-19 00:06:06 +00:00
Preston Gurd
f0a48ec8f1
This patch fixes 8 out of 20 unexpected failures in "make check"
...
when run on an Intel Atom processor. The failures have arisen due
to changes elsewhere in the trunk over the past 8 weeks or so.
These failures were not detected by the Atom buildbot because the
CPU on the Atom buildbot was not being detected as an Atom CPU.
The fix for this problem is in Host.cpp and X86Subtarget.cpp, but
shall remain commented out until the current set of Atom test failures
are fixed.
Patch by Andy Zhang and Tyler Nowicki!
llvm-svn: 160451
2012-07-18 20:49:17 +00:00
Nuno Lopes
216d571af7
simplify getSetSize() per Duncan's comments
...
llvm-svn: 160368
2012-07-17 15:43:59 +00:00
Nuno Lopes
986cc181b0
teach ConstantRange that zero times X is always zero
...
llvm-svn: 160317
2012-07-16 20:47:16 +00:00
Nuno Lopes
99504c577c
make ConstantRange::getSetSize() properly compute the size of wrapped and full sets.
...
Make it always return APInts with the same bitwidth for the same ConstantRange bitwidth to simply clients
llvm-svn: 160294
2012-07-16 18:08:12 +00:00
Galina Kistanova
7da6578291
Fixed few warnings.
...
llvm-svn: 160142
2012-07-12 20:45:36 +00:00
Argyrios Kyrtzidis
f141156e6c
In MemoryBuffer::getOpenFile() don't verify that the mmap'ed
...
file buffer is null-terminated.
If the file is smaller than we thought, mmap will not allow dereferencing
past the pages that are enough to cover the actual file size,
even though we asked for a larger address range.
rdar://11612916
llvm-svn: 160075
2012-07-11 20:59:20 +00:00
Benjamin Kramer
3aab6a86a2
PR13326: Fix a subtle edge case in the udiv -> magic multiply generator.
...
This caused 6 of 65k possible 8 bit udivs to be wrong.
llvm-svn: 160058
2012-07-11 18:31:59 +00:00
Benjamin Kramer
ae3c300625
Enable automatic GCC<->LLVM intrinsic translation for mips.
...
llvm-svn: 159367
2012-06-28 19:09:53 +00:00
Nuno Lopes
5020db2a8c
add ConstantRange::difference (to perform set difference/relative complement)
...
llvm-svn: 159352
2012-06-28 16:10:13 +00:00
Nuno Lopes
ebb0c94e1b
fix a off-by-one bug in intersectWith(), and add a bunch of tests
...
llvm-svn: 159319
2012-06-28 00:59:33 +00:00
Benjamin Kramer
efe4028693
Implement getHostCPUName for ARM/linux. This will be used to implement -march=native in clang.
...
The cpuid registers are only available in privileged mode so we don't have
an OS-independent way of implementing this. ARM doesn't provide a list of
processor IDs so the list is somewhat incomplete.
llvm-svn: 159228
2012-06-26 21:36:32 +00:00
Argyrios Kyrtzidis
46785f9461
Fix ThreadLocalImpl::getInstance for --disable-threads.
...
PR13114.
llvm-svn: 159210
2012-06-26 17:13:58 +00:00
Meador Inge
fc2fb711e8
PR13013: ELF Type identification fails for MSB type ELF files.
...
Fix 'sys::IdentifyFileType' to work with big and little endian byte orderings
when reading the ELF object file type.
Initial patch by Stefan Hepp.
llvm-svn: 159138
2012-06-25 14:48:43 +00:00
NAKAMURA Takumi
38f4c93837
llvm/lib/Support/Errno.cpp: [Win32] Fix usage of strerror_s().
...
FYI, two arguments of strerror_s() is provided in C++ on msvc.
llvm-svn: 159103
2012-06-24 03:51:04 +00:00