Commit Graph

1668 Commits

Author SHA1 Message Date
Duncan Sands
1f6a329f79 Silence a bunch (but not all) "variable written but not read" warnings
when building with assertions disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 14:54:45 +00:00
Bob Wilson
21ab6c066d Clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-10 05:02:22 +00:00
Bob Wilson
0dc8b42987 Put Darwin-specific code inside an __APPLE__ ifdef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 19:54:32 +00:00
Bob Wilson
f5b757642d Recognize the UNAME_RELEASE environment variable to match Darwin's uname.
When this variable is set, "uname -r" will return its value instead of the
real OS version.  Make this affect LLVM's triple for consistency.
<rdar://problem/9919167>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137111 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-09 05:13:36 +00:00
Sean Callanan
efd7919618 Added several architecture names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136552 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-30 01:29:54 +00:00
Nick Lewycky
2b9c50776a Don't look at $PWD in GetCurrentDirectory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136477 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 18:26:59 +00:00
Nick Lewycky
3c036e520e Teach Path::GetCurrentDirectory to use $PWD, to support users who like to do
screwy things by setting PWD != getcwd(). For example, some developers I know
will use this to control the value in gcc's DW_AT_comp_dir value in debug
output. With this patch, that trick will now work on clang too.

The only other effect of this change is that the static analysis will now
respect $PWD when reporting the directory of the files in its HTML output. I
think that's fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136459 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29 04:42:39 +00:00
Argyrios Kyrtzidis
814450a429 Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136310 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-28 00:29:20 +00:00
Jakub Staszak
ffcc2a542c Optimize 96-bit division a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136222 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 16:00:40 +00:00
Jakub Staszak
636a02b57c Move static methods to the anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136221 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 15:51:51 +00:00
Frits van Bommel
a09d514b29 Trim includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136218 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-27 15:20:06 +00:00
Duncan Sands
652b48bf23 Teach the Triple class about kfreebsd (FreeBSD kernel with
a GNU userspace).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136085 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26 15:30:04 +00:00
Jakub Staszak
15b35677d0 BranchProbability::print returns void now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135994 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:27:42 +00:00
Jakub Staszak
a26ec886a3 Add BlockFrequency class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135992 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25 22:24:51 +00:00
Chris Lattner
b7fbcc9696 switch Triple to take twines instead of stringrefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135889 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 20:45:08 +00:00
Chris Lattner
3f25ee080c Add Twine support for characters, and switch twine to use a union internally
to eliminate some casting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135888 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-24 20:44:30 +00:00
Chandler Carruth
48ac8e9be7 Move TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
The header file was already properly located. The previous need for it
in Support had to do with the version string printing which was fixed in
r135757.

Also update build dependencies where libraries that needed the
functionality of the Target library (in the form of the TargetRegistry)
were picking it up via Support. This is pretty pervasive, essentially
every TargetInfo library (ARMInfo, etc) uses TargetRegistry, making it
depend on Target. All of these were previously just sneaking by.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135760 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 08:16:53 +00:00
Chandler Carruth
4039313b4c Move the registered target printing in version strings completely out of
the Support library. Now its part of the TargetRegistry, and the three
commands that care about this explicitly register this extra bit of
version information.

The set of commands which care was computed by intersecting those which
use the Support library's version string printing and those that
initialize all the registered targets in a way that produces
a meaningful list. The only odd ball out is that 'clang -cc1as -version'
no longer prints the registered targets. I don't think anyone is really
interested in that (especially as the fact that llvm-mc does so is under
a FIXME), but if someone really does want this back I'll happily apply
the same patch there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135757 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 07:50:48 +00:00
Chandler Carruth
077c408717 Move the logic for printing the registered targets into a static
function on the TargetRegistry. Also clean it up and use the modern LLVM
utility libraries available instead of rolling a few things manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135756 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 07:50:44 +00:00
Chandler Carruth
6d51d26a24 Add an extension point to the CommandLine library where clients can
register extra version information to be printed. This is designed to
allow those tools which link in various targets to also print those
registered targets under --version.

Currently this printing logic is embedded into the Support library
directly; a huge layering violation. This is the first step to hoisting
it out into the tools without adding lots of duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135755 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 07:50:40 +00:00
NAKAMURA Takumi
12b2772578 lib/Support/Triple.cpp: Recognize "-march=ppc32" to llc properly, as quick hack.
FIXME: There is an inconsistency. llvm::Triple does not understand "ppc32" and PowerPC/TargetInfo holds "ppc32".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135745 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-22 04:02:22 +00:00
Chris Lattner
c30a38f34b move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.

Eliminate some extraenous uses of tie.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135669 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 06:21:31 +00:00
Jeffrey Yasskin
3ba292dbc2 Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
errors like the one corrected by r135261.  Migrate all LLVM callers of the old
constructor to the new one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135431 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 21:45:40 +00:00
Benjamin Kramer
8d4dd79526 Simplify & microoptimize code. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135364 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 00:00:20 +00:00
Frits van Bommel
331dbca73d In Twine::str(), if the Twine stores only a std::string, just return a direct copy of that instead of first copying to a SmallString and converting that to a std::string. Also fix some indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135267 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 11:05:37 +00:00
Chandler Carruth
e083805724 Explicitly cast the second argument to unsigned in order to select the
desired overload.

This is a bit of a hackish workaround to fix the compile after r135259.
Let me know if there is a better approach.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135261 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 07:31:10 +00:00
Jeffrey Yasskin
3d42bfbbdd Add an APFloat::convertToInt(APSInt) function that automatically manages the
memory for the result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135259 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 07:04:56 +00:00
NAKAMURA Takumi
71c10666cc Windows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134812 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 08:41:20 +00:00
Bob Wilson
7c3a5cac02 Update comments for SandyBridge CPU identifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134759 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 22:33:59 +00:00
Bob Wilson
26fc025e62 Recognize Intel CPUs with Family=6 and Model=44.
According to Intel Application Note 485, this value is used for
"Intel Core i7 and Intel Xeon processor".  Just include it with the other
"corei7-avx" entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134750 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 22:09:35 +00:00
Joerg Sonnenberger
f86b76ead7 Recognize mipseb as alias for mips for symmetry with mipsel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134617 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-07 16:53:52 +00:00
Eli Friedman
b0e77a228f Fix missing triple support for RTEMS target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134532 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-06 20:56:26 +00:00
Chad Rosier
338398a288 By default mkstemp() creates a temporary file with mode 0600, but the mode
used for open is 0666.  Therefore, add the necessary permission bits for
consistency.
rdar://8621462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134430 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-05 18:55:31 +00:00
Duncan Sands
ba519f8fc9 Revert previous commit. It seems that whether casting to void
is valid or not depends on which system you build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134321 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 13:14:22 +00:00
Duncan Sands
d01cb35804 Supress gcc-4.5 warning about the result not being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134319 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 13:06:23 +00:00
Douglas Gregor
6ced1d12dd Add initial *-*-rtems* target, from Joel Sherrill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134282 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-01 22:41:06 +00:00
Nick Lewycky
e6240e8b83 Fix the implementation of ConstantRange::sub(ConstantRange). Patch by Xi Wang!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133648 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 21:13:46 +00:00
Ted Kremenek
cf886188fb add option for literal formatting to APInt::toString()
toString() now takes an optional bool argument that,
depending on the radix, adds the appropriate prefix
to the integer's string representation that makes it into a
meaningful C literal, e.g.:

hexademical: '-f' becomes '-0xf'
octal: '77' becomes '077'
binary: '110' becomes '0b110'

Patch by nobled@dreamwidth.org!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133032 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15 00:51:55 +00:00
Evan Cheng
ff276b40f0 Aliased flag options should be directed to stdout, not stderr to be consistent. Patch by Julien Lerouge.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132931 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-13 20:45:54 +00:00
Andrew Trick
f289df2d95 Branch profiling: floating-point avoidance.
Patch by: Jakub Staszak!

Introduces BranchProbability. Changes unsigned to uint32_t all over and
uint64_t only when overflow is expected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132867 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-11 01:05:22 +00:00
Chris Lattner
78a113cbff add another sandybridge alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132772 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-09 06:38:17 +00:00
Zhongxing Xu
422b62b407 singed int causes signed extension, which contradicts the intention to pick up
integers with high 32 bits being zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 08:29:51 +00:00
Joerg Sonnenberger
dd137903e4 Add new -d option to tblgen. It writes a make(1)-style dependency file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132395 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 13:10:15 +00:00
John McCall
fe754ab90a ...this is not a good commit day for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 19:44:55 +00:00
John McCall
832a9d1a76 On Darwin ARM, set the UNWIND_RESUME libcall to _Unwind_SjLj_Resume.
This is important for the correct lowering of unwind instructions
(which doesn't matter at all) and llvm.eh.resume calls (which does).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132291 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 19:39:04 +00:00
Chris Lattner
c4cb237ca6 fix a bug for hosts without round, PR8893.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131842 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 06:03:53 +00:00
Chris Lattner
9bb4a2ae8a random comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131829 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:50:53 +00:00
Andrew Trick
dc5948d472 Have Program::Wait return -2 for crashed and timeouts instead of embedding
info in the error message. Per Dan's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131780 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-21 00:56:46 +00:00
Benjamin Kramer
eb274e6bdd Rename the "sandybridge" subtarget to "corei7-avx", for GCC compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131730 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-20 15:11:26 +00:00
Rafael Espindola
7205d431f1 Revert my previous patch. The cmake build had already been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131606 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-19 00:02:45 +00:00