Commit Graph

1420 Commits

Author SHA1 Message Date
Owen Anderson
d84668446c Re-enable CorrelatedValuePropagation. I've tested nightly tests, llvm-gcc
bootstrap, and clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 04:16:28 +00:00
Dan Gohman
df782a789d Remove obsolete comments about throwing exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-02 22:14:51 +00:00
Dan Gohman
a2259e17b7 Reword this comment. Don't mention outs(), as that's not what
this code is actually testing for.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 23:33:02 +00:00
Owen Anderson
c096704c4a Disable CorrelatedValuePropagation while I track down selfhost failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 19:20:46 +00:00
Owen Anderson
5627db6fb9 Tentatively add correlated value propagation to the set of standard passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 18:30:15 +00:00
Dan Gohman
d4c454317a Make tool_output_file's raw_ostream instance a member variable instead
of a base class.

This makes it possible to unregister the file from FilesToRemove when
the file is done. Also, this eliminates the need for
formatted_tool_output_file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 14:20:41 +00:00
Michael J. Spencer
4563704c21 COFF: Fix incorrect SCT_COMPLEX_TYPE_SHIFT. Add a few constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112703 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 14:09:36 +00:00
Duncan Sands
f8ff40c059 Define LLVM_GLOBAL_VISIBILITY to be __declspec(dllexport) on
windows systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 13:07:11 +00:00
Chris Lattner
8bfc4299c2 Stop explicitly scheduling domfrontier before the loop passes,
since none of them use it.  With this, we now only run 
domfrontier (an N^2 analysis) 3 times at clang -O3: once for 
"early" per-function cleanup, once at the start of the
per-function pipeline to support SRoA, and once late because
the EHPrepare class uses it.

EHPrepare needs to stop using it, this is silly and wasteful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112420 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-29 07:05:51 +00:00
Chris Lattner
dee1da0dc3 add m_BitCast for matching a bitcast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 21:35:52 +00:00
Mikhail Glushenkov
6bb156a681 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111825 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 19:23:54 +00:00
Dan Gohman
baf2883e0a formatted_tool_output_file::close needs to flush its buffer before
closing the underlying stream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111822 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-23 18:43:24 +00:00
Michael J. Spencer
da0bfcdaf9 MC: Add partial x86-64 support to COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111728 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-21 05:58:13 +00:00
Dan Gohman
8d18006cf2 Delete SlowOperationInformer, which is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 18:07:37 +00:00
Mikhail Glushenkov
3120c18e08 Add include guards to Support/Regex.h.
If the omission was intentional, please add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 17:38:44 +00:00
Mikhail Glushenkov
7112c86fc2 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 17:38:38 +00:00
Dan Gohman
a1f89deb56 Delete raw_stdout_ostream and raw_stderr_ostream, which are unused
outside of outs() and errs() themselves, and they don't really
need custom classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:39:41 +00:00
Dan Gohman
00d1cdeca9 Add an inspirational quote.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111641 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:36:19 +00:00
Dan Gohman
27f7aad50b Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:35:30 +00:00
Dan Gohman
8df0e01046 Move raw_ostream's Error flag into raw_fd_ostream, as that's the only
class which is using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:34:20 +00:00
Dan Gohman
634d661965 Export error-handling functions in formatted_tool_output_file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111638 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:27:38 +00:00
Mikhail Glushenkov
68e18b3054 Disambiguate calls to WriteGraph() to disable ADL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 11:24:35 +00:00
Mikhail Glushenkov
c0086edac4 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 11:24:31 +00:00
Dan Gohman
af0636f4d6 Introduce a new tool_output_file class, which extends raw_ostream with
functionality that most command-line tools need: ensuring that the
output file gets deleted if the tool is interrupted or encounters an
error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111595 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 00:48:10 +00:00
Dan Gohman
2499990699 Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 22:26:19 +00:00
Dan Gohman
e16068240e Introduce a ScopedFatalErrorHandler class to make it easy to register
fatal error handlers which automatically get unregistered at the end
of a scope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 20:16:39 +00:00
Daniel Dunbar
a8fa798246 CrashRecovery: Add CrashRecoveryContext::GetCurrent(), so clients can find the active context from anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:32:37 +00:00
Daniel Dunbar
c0c815e887 CrashRecovery: Make CrashRecoveryContext static methods thread safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 22:32:34 +00:00
Anton Korobeynikov
d7343ddce5 Add some win64 coff goodness.
Patch by Cameron Esfahani!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 21:05:54 +00:00
Benjamin Kramer
e5b57347e9 Sketch i386 relocations handling, from Roman Divacky.
Hello world builds & runs now on i386/ELF with -integrated-as.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 18:20:28 +00:00
Benjamin Kramer
755525ad23 There is this new "LLVM" compiler that supports __builtin_bswap but thinks it's gcc 4.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 11:45:38 +00:00
Matt Fleming
6b2e257e74 Add ELF ObjectWriter and Streamer support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-16 18:35:43 +00:00
Nick Lewycky
7f9ef4bb51 Clean up ConstantRange a bit:
- remove ashr which never worked.
 - fix lshr and shl and add tests.
 - remove dead function "intersect1Wrapped".
 - add a new sub method to subtract ranges, with test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110861 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 22:04:36 +00:00
Mikhail Glushenkov
1e67278dd5 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10 14:49:24 +00:00
Benjamin Kramer
fff0f11989 Roll back my last two commits, valgrind complains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 13:27:41 +00:00
Benjamin Kramer
0055fac724 A reference to the Timer's name is safe, it outlives the contents of the vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110517 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 13:07:57 +00:00
Benjamin Kramer
5aa8df22e7 Shrink PassNameParser's binary size with array_pod_sort.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110512 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 11:45:42 +00:00
Owen Anderson
0aede9e2a8 Remove layering violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 06:01:13 +00:00
Owen Anderson
9773e45a1e Add an inverse() method to ConstantRange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 05:47:46 +00:00
Dan Gohman
fc8b58e1d4 Delete this explicit assignment operator; it's equivalent to
the implicit one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 01:17:47 +00:00
Owen Anderson
634bab148c Add a convenience constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110493 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 00:42:06 +00:00
Rafael Espindola
565aafc997 Some cleanup. Use a class (OptionInfo) instead of a pair of a pair and remove
some default values that are not used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110485 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 23:03:52 +00:00
Gabor Greif
3ecf355c7a remove the private hack from CallInst, it was not supposed to hit the branch anyway
as a positive consequence the CallSite::getCallee() methods now can be rewritten to be
a bit more efficient

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 21:25:49 +00:00
Owen Anderson
9850a28866 Give ConstantRange an operator=
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 20:51:10 +00:00
Torok Edwin
484959a26c Fix build of DataFlow.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 09:30:20 +00:00
Dan Gohman
26e064ff32 Don't construct a std::string with a literal "".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110180 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 01:14:33 +00:00
Dan Gohman
5825545553 Don't print the filename twice in file-not-found errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-04 01:13:48 +00:00
Dan Gohman
79fca6fea8 Thread const correctness through a bunch of AliasAnalysis interfaces and
eliminate several const_casts.

Make CallSite implicitly convertible to ImmutableCallSite.

Rename the getModRefBehavior for intrinsic IDs to
getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite,
which happens to be implicitly convertible to bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-03 21:48:53 +00:00
Gabor Greif
436ed471cc remove a layer of cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109821 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 23:35:00 +00:00
Daniel Dunbar
a309dac868 Support: Add CrashRecoveryContext helper object.
- Designed as a simple wrapper to allow clients to attempt to catch crashes
   (memory errors, assertion violations, etc.) and do some kind of recovery.

 - Currently doesn't actually attempt to catch crashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109586 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 15:40:20 +00:00