Commit Graph

348 Commits

Author SHA1 Message Date
Hal Finkel c34e51132c 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).

llvm-svn: 149468
2012-02-01 03:51:43 +00:00
Daniel Dunbar 27a7489a03 LLVMBuild: Remove trailing newline, which irked me.
llvm-svn: 146409
2011-12-12 19:48:00 +00:00
Duncan Sands 0f19e91a79 When doing "opt -O2" verify the bitcode like is done for
"opt -std-compile-opts".

llvm-svn: 146036
2011-12-07 17:14:20 +00:00
Benjamin Kramer 1f97a5a671 Remove all remaining uses of Value::getNameStr().
llvm-svn: 144648
2011-11-15 16:27:03 +00:00
Daniel Dunbar 57fb3ae997 LLVMBuild: Add description files for the LLVM tools.
llvm-svn: 144417
2011-11-11 22:59:39 +00:00
Daniel Dunbar 96d812a68d build: Tidy up a bunch of tool Makefiles, and simplify where possible using the
new all-targets pseudo-component.

llvm-svn: 142401
2011-10-18 19:27:24 +00:00
Chris Lattner a3a0681083 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.

llvm-svn: 142106
2011-10-16 04:47:35 +00:00
Bill Wendling 2d3138c112 Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.
This is some of my original LLVM code. *wipes tear*

llvm-svn: 136821
2011-08-03 22:18:20 +00:00
Rafael Espindola 591eaa481e 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.

llvm-svn: 136726
2011-08-02 21:50:24 +00:00
Eli Friedman b68fe25e3e We only do always-inlining at -O1; make opt reflect that.
llvm-svn: 132693
2011-06-06 22:13:27 +00:00
Chris Lattner ef8cf6d421 initialize and finalize function passes, pointed out by Cameron.
llvm-svn: 131843
2011-05-22 06:44:19 +00:00
Chris Lattner 3d70addad7 switch opt to using PassManagerBuilder.h
llvm-svn: 131824
2011-05-22 00:21:33 +00:00
Chris Lattner 706754c1f2 remove graphprinter support for domfrontier.
llvm-svn: 128938
2011-04-05 21:43:56 +00:00
Andrew Trick 12004013ef 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
Andrew Trick b826ae8310 whitespace
llvm-svn: 128905
2011-04-05 18:41:31 +00:00
Devang Patel 0abc463f5b Update BreakpointPrinter to emit original function names only.
llvm-svn: 128839
2011-04-04 19:51:17 +00:00
Chris Lattner 1341df93f7 add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
llvm-svn: 125978
2011-02-18 22:34:03 +00:00
Chris Lattner 15c8b5ef8b Have opt set up a specific TargetLibraryInfo for modules
with a triple.

llvm-svn: 125970
2011-02-18 22:13:01 +00:00
Peter Collingbourne 53049153cf Make -disable-simplify-libcalls work with -std-compile-opts
llvm-svn: 125824
2011-02-18 02:59:21 +00:00
Devang Patel b07ec831cf While printing "interesting" breakpoint locations for debug info quality test harness, focus only on entry block's terminator for now.
llvm-svn: 124610
2011-01-31 21:36:24 +00:00
Tobias Grosser 7dbb48244f RegionPassPrinter should contain the name of the pass printed
llvm-svn: 123941
2011-01-20 21:03:20 +00:00
Chris Lattner bf0aa927cc split dom frontier handling stuff out to its own DominanceFrontier header,
so that Dominators.h is *just* domtree.  Also prune #includes a bit.

llvm-svn: 122714
2011-01-02 22:09:33 +00:00
Devang Patel 197df5c9c8 Print breakpoints for call instructions. This is used by optimized debug info test harness.
llvm-svn: 121432
2010-12-09 23:37:07 +00:00
Devang Patel 786a05e6ad 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.
llvm-svn: 121078
2010-12-07 00:33:43 +00:00
Tobias Grosser 083379f815 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.

llvm-svn: 120732
2010-12-02 20:35:16 +00:00
Michael J. Spencer 447762da85 Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Jakob Stoklund Olesen 1d73c0e462 Tweak the opt -O2 / opt -O3 inliner thresholds to be the same as llvm-gcc and
clang are using.

llvm-svn: 118118
2010-11-02 23:40:28 +00:00
Tobias Grosser 23c8341c3d 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.

llvm-svn: 116905
2010-10-20 01:54:44 +00:00
Owen Anderson 6c18d1aac0 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.

llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Dan Gohman 0df7ea4c24 Move tool_output_file into its own file.
llvm-svn: 115973
2010-10-07 20:32:40 +00:00
Michael J. Spencer 93c9b2ea93 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer dc38d36ccb CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Tobias Grosser 011d79aeb2 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.

llvm-svn: 113360
2010-09-08 15:02:51 +00:00
Tobias Grosser e5fcde7d1c Include original pass name in the PassPrinter's name.
llvm-svn: 113359
2010-09-08 15:02:47 +00:00
Dan Gohman a2233f2801 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.

llvm-svn: 112706
2010-09-01 14:20:41 +00:00
Dan Gohman 8525fe7155 Convert tools to use tool_output_file, and introduce error
checking to places which previously lacked it.

llvm-svn: 111651
2010-08-20 16:59:15 +00:00
Dan Gohman 268b0f4781 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.

llvm-svn: 111603
2010-08-20 01:07:01 +00:00
Dan Gohman d3ee4238a5 Make the SCC printing passes use errs() instead of outs(), as the
other printing passes do, and update the documentation accordingly.

llvm-svn: 111601
2010-08-20 01:03:44 +00:00
Dan Gohman 061cb1cac7 Minor cleanups to follow the common convention for pass
registration variables.

llvm-svn: 111598
2010-08-20 01:00:03 +00:00
Dan Gohman 12bb5054b3 Minor cleanups to follow the common convention for pass
registration variables.

llvm-svn: 111596
2010-08-20 00:56:16 +00:00
Dan Gohman 083330a8f2 Allow the -analyze option to follow the -o option, which defaults to
standard output, instead of just hardcoding outs().

llvm-svn: 111372
2010-08-18 17:42:59 +00:00
Dan Gohman b01aed1cb2 Don't translate "-" to outs() manually; raw_ostream does that automatically.
llvm-svn: 111371
2010-08-18 17:40:10 +00:00
Owen Anderson a7aed18624 Reapply r110396, with fixes to appease the Linux buildbot gods.
llvm-svn: 110460
2010-08-06 18:33:48 +00:00
Owen Anderson bda59bd247 Revert r110396 to fix buildbots.
llvm-svn: 110410
2010-08-06 00:23:35 +00:00
Owen Anderson 755aceb5d0 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.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Gabor Greif 62f0aac99d simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
llvm-svn: 109687
2010-07-28 22:50:26 +00:00
Duncan Sands 41b4a6b36a Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Duncan Sands 9f403695e1 Change another reference to the "indirect callgraph node" to
refer to the "external node" instead.

llvm-svn: 105731
2010-06-09 17:39:05 +00:00
Duncan Sands 516473902b 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.

llvm-svn: 105730
2010-06-09 17:35:00 +00:00
Dan Gohman d9225cee20 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.

llvm-svn: 104878
2010-05-27 20:06:51 +00:00