1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

1600 Commits

Author SHA1 Message Date
Chris Lattner
75adf06d44 fix a bug for hosts without round, PR8893.
llvm-svn: 131842
2011-05-22 06:03:53 +00:00
Chris Lattner
69a52dd280 random comment cleanups.
llvm-svn: 131829
2011-05-22 00:50:53 +00:00
Andrew Trick
9f867fd2dc Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.

llvm-svn: 131780
2011-05-21 00:56:46 +00:00
Benjamin Kramer
83096d1db1 Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
llvm-svn: 131730
2011-05-20 15:11:26 +00:00
Rafael Espindola
0a9911d920 Revert my previous patch. The cmake build had already been fixed.
llvm-svn: 131606
2011-05-19 00:02:45 +00:00
Rafael Espindola
587fa89510 Fix the cmake build.
llvm-svn: 131602
2011-05-18 23:56:40 +00:00
Eli Friedman
98235fd498 Shuffle StandardPasses.cpp into VMCore; add it to CMake.
llvm-svn: 131600
2011-05-18 23:51:11 +00:00
Eli Friedman
e1ee02ff3d Third pass at allowing plugins to modify default passes. This time with a tweak so that we don't depend on an uninitialized argument.
llvm-svn: 131581
2011-05-18 21:40:04 +00:00
Eli Friedman
530e34b4af Revert r131556; it's breaking buildbots/clang tests.
llvm-svn: 131567
2011-05-18 20:39:27 +00:00
David Chisnall
b2d7afdada Second pass at allowing plugins to modify default passes. This time without bonus inter-library dependencies.
llvm-svn: 131556
2011-05-18 19:00:41 +00:00
Rafael Espindola
d086472933 Don't include information about the build into the information returned by
getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu.

llvm-svn: 131463
2011-05-17 15:26:34 +00:00
Devang Patel
dd08ae41c6 Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g

llvm-svn: 131244
2011-05-12 21:29:42 +00:00
Devang Patel
b865dd6a20 Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
llvm-svn: 131238
2011-05-12 19:06:16 +00:00
Andrew Trick
9d2b107117 Typo and missing checkin from r131186.
llvm-svn: 131187
2011-05-11 16:44:08 +00:00
Andrew Trick
25d4fce092 Bugpoint support for miscompilations that result in a crash.
This change allows bugpoint to pinpoint the "opt" pass and bitcode
segment responsible for a crash caused by miscompilation. At least it
works well for me now, without having to create any custom execution
wrappers.

llvm-svn: 131186
2011-05-11 16:31:24 +00:00
Nick Lewycky
9b28874ca6 In option typo correction, consider -foo=VALUE flags as two distinct parts. The
comments claimed it did this, but the LHS value was actually an unused variable.

The new system considers only the '-foo' part when comparing it for typos
against flags that have values, but still look at the whole string for flags
that don't. That way, we'll still correct '-inst=combine' to '-instcombine'.

llvm-svn: 130685
2011-05-02 05:24:47 +00:00
NAKAMURA Takumi
3788ada5db Windows/DynamicLibrary.inc: Clean up ELM_Callback. We may check the decl instead of the versions of individual libraries.
autoconf: Add checking ELM_Callback decl for mingw32 and mingw-w64.
cmake/config-ix.cmake: Add checking ELM_Callback decl for win32.

llvm-svn: 130657
2011-05-01 13:29:49 +00:00
Douglas Gregor
8b6257aba2 Include <pthread.h> before we use pthread_self/pthread_kill
llvm-svn: 130510
2011-04-29 16:12:17 +00:00
Ted Kremenek
16f206d185 Add MemoryBuffer::getBufferKind() to report whether a memory buffer uses malloc'ed or mmap'ed memory. This is for performance analysis.
llvm-svn: 130432
2011-04-28 20:34:18 +00:00
Lenny Maiorani
1b1a9860d1 Remove bounded StringRef::compare() since nothing but Clang SA was using it and it is just as easy to use StringRef::substr() preceding StringRef::compare() to achieve the same thing.
llvm-svn: 130430
2011-04-28 20:20:12 +00:00
Chris Lattner
75652009a0 allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,
patch by Johannes Schaub!

llvm-svn: 130151
2011-04-25 20:58:50 +00:00
Jay Foad
9547cc903c Like the coding standards say, do not use "using namespace std".
llvm-svn: 130054
2011-04-23 09:06:00 +00:00
Eric Christopher
2c662fa29e Add support for 64-bit object files to Path.
llvm-svn: 129975
2011-04-22 03:50:19 +00:00
Devang Patel
5b09b96367 Add DW_OP_bit_piece.
llvm-svn: 129945
2011-04-21 22:26:13 +00:00
Daniel Dunbar
d1ebdf5c43 sys/Host: Change getHostTriple() to return the full Darwin version on OS X.
llvm-svn: 129852
2011-04-20 15:44:33 +00:00
Justin Holewinski
dc1965a16c PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
used by Clang.  To help Clang integration, the PTX target has been split
     into two targets: ptx32 and ptx64, depending on the desired pointer size.

- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64

llvm-svn: 129851
2011-04-20 15:37:17 +00:00
Daniel Dunbar
3f19424547 ADT/Triple: Drop support for -osx style triples, we are going with -macosx
instead.

llvm-svn: 129836
2011-04-19 23:55:20 +00:00
Daniel Dunbar
6af8a09825 ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved.

llvm-svn: 129833
2011-04-19 23:34:12 +00:00
Daniel Dunbar
9934e8436d ADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.
llvm-svn: 129815
2011-04-19 21:12:05 +00:00
Daniel Dunbar
0fa8b6f591 ADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
enumeration values.

llvm-svn: 129814
2011-04-19 21:07:03 +00:00
Daniel Dunbar
e24d3d1bc5 ADT/Triple: Generalize and simplify getDarwinNumber to just be getOSVersion.
llvm-svn: 129799
2011-04-19 20:24:34 +00:00
Daniel Dunbar
ce4e39d010 ADT/Triple: Add support for more explicit "osx" and "ios" OS names.
llvm-svn: 129798
2011-04-19 20:19:27 +00:00
Ted Kremenek
7cac5a8369 Add BumpPtrAllocator::getTotalMemory() to allow clients to query how much memory a BumpPtrAllocator allocated.
llvm-svn: 129727
2011-04-18 22:44:46 +00:00
Devang Patel
eddab1d186 Introduce support to encode Objective-C property information in debugging information generated for an interface.
llvm-svn: 129624
2011-04-16 00:11:51 +00:00
Lenny Maiorani
dfae65d305 Implements StringRef::compare with bounds. It is behaves similarly to strncmp(). Unit tests also included.
llvm-svn: 129582
2011-04-15 17:56:50 +00:00
Chris Lattner
0304b82f80 Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Chris Lattner
2cfc29b28d regexes are allowed to match empty things, e.g. {{.*}} in filecheck.
llvm-svn: 129193
2011-04-09 06:29:24 +00:00
Frits van Bommel
51604bed0f Fix a few instances of "warning: extra ';' outside of a function [-pedantic]".
llvm-svn: 129002
2011-04-06 12:29:56 +00:00
Roman Divacky
52e462b5e5 Add support for detection of Intel SandyBridge.
llvm-svn: 128920
2011-04-05 20:25:36 +00:00
Andrew Trick
7e2e555075 Added *hidden* flags -print-options and -print-all-options so
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.

Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.

llvm-svn: 128910
2011-04-05 18:54:36 +00:00
Eric Christopher
0e88a490eb Assorted bugfixes in object file handling:
- Adds support for sniffing PE/COFF files on win32 (.exe and .dll)
   which are COFF files that have an MS-DOS compatibility stub on
   the front of them.

 - Fixes a bug in the COFFObjectFile's support for the Microsoft COFF
   extension for long symbol names, wherein it was attempting to parse
   the leading '/' in an extended symbol name reference as part of the
   integer offset.

 - Fixes bugs in COFFObjectFile and ELFObjectFile wherein section
   and symbol iterators were being returned with uninitialized bytes;
   the type DataRefImpl is a union between 2 32-bit words (d.a and d.b)
   and a single intptr_t word (p). Only p was being initialized, so in
   32-bit builds the result would be iterators with random upper 32-bit
   words in their DataRefImpls. This caused random failures when
   seeking around in object files.

Patch by Graydon Hoare!

llvm-svn: 128799
2011-04-03 22:53:19 +00:00
Jakob Stoklund Olesen
37134e568d Reset StringMap's NumTombstones on clears and rehashes.
StringMap was not properly updating NumTombstones after a clear or rehash.

This was not fatal until now because the table was growing faster than
NumTombstones could, but with the previous change of preventing infinite
growth of the table the invariant (NumItems + NumTombstones <= NumBuckets)
stopped being observed, causing infinite loops in certain situations.

Patch by José Fonseca!

llvm-svn: 128567
2011-03-30 18:32:51 +00:00
Jakob Stoklund Olesen
b4df99dc06 Prevent infinite growth of SmallPtrSet instances.
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

llvm-svn: 128566
2011-03-30 18:32:48 +00:00
Jakob Stoklund Olesen
0daa5f56cb Prevent infinite growth of SmallMap instances.
Rehash but don't grow when full of tombstones.

Patch by José Fonseca!

llvm-svn: 128565
2011-03-30 18:32:44 +00:00
Benjamin Kramer
e6e5b11a65 Avoid turning a floating point division with a constant power of two into a denormal multiplication.
Some platforms may treat denormals as zero, on other platforms multiplication
with a subnormal is slower than dividing by a normal.

llvm-svn: 128555
2011-03-30 17:02:54 +00:00
Benjamin Kramer
7888d0935d Add APFloat::getExactInverse.
The idea is, that if an ieee 754 float is divided by a power of two, we can
turn the division into a cheaper multiplication. This function sees if we can
get an exact multiplicative inverse for a divisor and returns it if possible.

This is the hard part of PR9587.

I tested many inputs against llvm-gcc's frotend implementation of this
optimization and didn't find any difference. However, floating point is the
land of weird edge cases, so any review would be appreciated.

llvm-svn: 128545
2011-03-30 15:42:27 +00:00
Frits van Bommel
c234349939 Constant folding support for calls to umul.with.overflow(), basically identical to the smul.with.overflow() code.
llvm-svn: 128379
2011-03-27 14:26:13 +00:00
Andrew Trick
a50ee2e148 revert r128199 until it can be made to work with Frontend/dependency-gen.c.
llvm-svn: 128218
2011-03-24 16:43:37 +00:00
Michael J. Spencer
3314c920a5 Remove all uses of PATH_MAX and MAXPATHLEN from PathV2.
llvm-svn: 128199
2011-03-24 05:23:40 +00:00
Rafael Espindola
9e0fcfc02b We don't need a null terminator for the output file.
llvm-svn: 128098
2011-03-22 19:20:47 +00:00