Commit Graph

380 Commits

Author SHA1 Message Date
Hal Finkel
de5e5ec304 Add a basic-block autovectorization pass.
This is the initial checkin of the basic-block autovectorization pass along with some supporting vectorization infrastructure.
Special thanks to everyone who helped review this code over the last several months (especially Tobias Grosser).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149468 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-01 03:51:43 +00:00
Daniel Dunbar
4ab406d7fc LLVMBuild: Remove trailing newline, which irked me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-12 19:48:00 +00:00
Duncan Sands
a3e585d4c2 When doing "opt -O2" verify the bitcode like is done for
"opt -std-compile-opts".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146036 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-07 17:14:20 +00:00
Benjamin Kramer
a7b0cb7594 Remove all remaining uses of Value::getNameStr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144648 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-15 16:27:03 +00:00
Daniel Dunbar
0d3c223035 LLVMBuild: Add description files for the LLVM tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144417 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-11 22:59:39 +00:00
Daniel Dunbar
8c39c9647d build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-18 19:27:24 +00:00
Chris Lattner
d8b7aa2613 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-16 04:47:35 +00:00
Bill Wendling
2626dba9c5 Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.
This is some of my original LLVM code. *wipes tear*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136821 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 22:18:20 +00:00
Rafael Espindola
3d453ac131 move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,
but it solves a layering violation since things in Support are not supposed to
use things in Transforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136726 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 21:50:24 +00:00
Eli Friedman
42d41fda08 We only do always-inlining at -O1; make opt reflect that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132693 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-06 22:13:27 +00:00
Chris Lattner
3e8984a0c4 initialize and finalize function passes, pointed out by Cameron.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131843 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 06:44:19 +00:00
Chris Lattner
52b28896c8 switch opt to using PassManagerBuilder.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131824 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 00:21:33 +00:00
Chris Lattner
51fbec9021 remove graphprinter support for domfrontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128938 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05 21:43:56 +00:00
Andrew Trick
ce96902d88 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128910 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05 18:54:36 +00:00
Andrew Trick
a41af7aeef whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128905 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05 18:41:31 +00:00
Devang Patel
1be9980d06 Update BreakpointPrinter to emit original function names only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128839 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-04 19:51:17 +00:00
Chris Lattner
188a7e00e7 add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125978 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:34:03 +00:00
Chris Lattner
2a66acafaf Have opt set up a specific TargetLibraryInfo for modules
with a triple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125970 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:13:01 +00:00
Peter Collingbourne
90d238ce8a Make -disable-simplify-libcalls work with -std-compile-opts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125824 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 02:59:21 +00:00
Devang Patel
97f6d5b241 While printing "interesting" breakpoint locations for debug info quality test harness, focus only on entry block's terminator for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124610 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31 21:36:24 +00:00
Tobias Grosser
5839614d97 RegionPassPrinter should contain the name of the pass printed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123941 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-20 21:03:20 +00:00
Chris Lattner
9fc5cdf77c split dom frontier handling stuff out to its own DominanceFrontier header,
so that Dominators.h is *just* domtree.  Also prune #includes a bit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122714 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-02 22:09:33 +00:00
Devang Patel
29012319cd Print breakpoints for call instructions. This is used by optimized debug info test harness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121432 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-09 23:37:07 +00:00
Devang Patel
f5f2300d24 Add a simple breakpoint location printer. This will be used by upcoming "debug info in optimized code" quality test harness to set breakpoints at "interesting" locations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-07 00:33:43 +00:00
Tobias Grosser
7593f34d67 Move check of command line options after command line parsing.
The check to not allow -analyze and -disable-output at the same time was done
before parsing the command line flags. Therefore it never triggered, and in case
both options where used opt segfaulted. Fix this by moving this check a after
command line parsing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 20:35:16 +00:00
Michael J. Spencer
1f6efa3996 Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:16:10 +00:00
Jakob Stoklund Olesen
e6c6cec82b Tweak the opt -O2 / opt -O3 inliner thresholds to be the same as llvm-gcc and
clang are using.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118118 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-02 23:40:28 +00:00
Tobias Grosser
6551360535 Add RegionPass support.
A RegionPass is executed like a LoopPass but on the regions detected by the
RegionInfo pass instead of the loops detected by the LoopInfo pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116905 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 01:54:44 +00:00
Owen Anderson
081c34b725 Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 17:21:58 +00:00
Dan Gohman
e4f1a9b8a2 Move tool_output_file into its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115973 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-07 20:32:40 +00:00
Michael J. Spencer
3a210e2d30 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-13 23:59:48 +00:00
Michael J. Spencer
4e9c939312 CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:14:25 +00:00
Tobias Grosser
e9dcd033e4 Execute all Pass Printers even if -quiet is set.
Follow the same logic in the LoopPass, ModulePass and CallGraphSCCPass printers,
as it was already used in the BasicBlockPass and FunctionPass printers. This is
more consistent.

The other option would have been to completely disable dumping the analysis
information. However, as this information is the only information printed if the
-analysis flag is set, calling opt would not do anything at all.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 15:02:51 +00:00
Tobias Grosser
4207d6f785 Include original pass name in the PassPrinter's name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 15:02:47 +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
Dan Gohman
f29140106f Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 16:59:15 +00:00
Dan Gohman
d5826a33a5 Use the new tool_output_file in several tools. This fixes a variety
of problems with output files being left behind or output streams
being left unclosed. Fix llvm-mc to respect the -o option in all
modes, rather than hardcoding outs() in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111603 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 01:07:01 +00:00
Dan Gohman
52fdaeda75 Make the SCC printing passes use errs() instead of outs(), as the
other printing passes do, and update the documentation accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 01:03:44 +00:00
Dan Gohman
cfbe401e8b Minor cleanups to follow the common convention for pass
registration variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111598 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 01:00:03 +00:00
Dan Gohman
a2a3bbc668 Minor cleanups to follow the common convention for pass
registration variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111596 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-20 00:56:16 +00:00
Dan Gohman
4931b312c0 Allow the -analyze option to follow the -o option, which defaults to
standard output, instead of just hardcoding outs().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 17:42:59 +00:00
Dan Gohman
86cbc1bb11 Don't translate "-" to outs() manually; raw_ostream does that automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111371 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-18 17:40:10 +00:00
Owen Anderson
90c579de5a Reapply r110396, with fixes to appease the Linux buildbot gods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 18:33:48 +00:00
Owen Anderson
1f74590e9d Revert r110396 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 00:23:35 +00:00
Owen Anderson
9ccaf53ada Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:42:04 +00:00
Gabor Greif
7d3056b160 simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 22:50:26 +00:00
Duncan Sands
3472766f9e Convert some tab stops into spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-12 08:16:59 +00:00
Duncan Sands
3982c2c8bc Change another reference to the "indirect callgraph node" to
refer to the "external node" instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105731 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09 17:39:05 +00:00
Duncan Sands
c0ccc70414 Output "external node" rather than "Indirect CallGraph node" when printing
callgraph SCC's.  This makes it match what the node itself would print.  Also,
"indirect callgraph node" doesn't make sense - it has nothing particularly to
do with indirect calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105730 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09 17:35:00 +00:00
Dan Gohman
d928fb670f Don't special-case stdout in llvm::WriteBitcodeToFile; just consider
it to be the caller's responsibility to provide a stream in binary
mode. This fixes a layering violation and avoids an outs() call.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104878 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 20:06:51 +00:00