Commit Graph

37 Commits

Author SHA1 Message Date
Chandler Carruth 5ad5f15cff [cleanup] Move the Dominators.h and Verifier.h headers into the IR
directory. These passes are already defined in the IR library, and it
doesn't make any sense to have the headers in Analysis.

Long term, I think there is going to be a much better way to divide
these matters. The dominators code should be fully separated into the
abstract graph algorithm and have that put in Support where it becomes
obvious that evn Clang's CFGBlock's can use it. Then the verifier can
manually construct dominance information from the Support-driven
interface while the Analysis library can provide a pass which both
caches, reconstructs, and supports a nice update API.

But those are very long term, and so I don't want to leave the really
confusing structure until that day arrives.

llvm-svn: 199082
2014-01-13 09:26:24 +00:00
Chandler Carruth 3bdf043c98 [PM] Update one user of the printing pass API that I missed.
llvm-svn: 199046
2014-01-12 11:39:04 +00:00
Chandler Carruth b8ddc7043c [PM] Rename the IR printing pass header to a more generic and correct
name to match the source file which I got earlier. Update the include
sites. Also modernize the comments in the header to use the more
recommended doxygen style.

llvm-svn: 199041
2014-01-12 11:10:32 +00:00
Chandler Carruth 9aca918df9 Move the LLVM IR asm writer header files into the IR directory, as they
are part of the core IR library in order to support dumping and other
basic functionality.

Rename the 'Assembly' include directory to 'AsmParser' to match the
library name and the only functionality left their -- printing has been
in the core IR library for quite some time.

Update all of the #includes to match.

All of this started because I wanted to have the layering in good shape
before I started adding support for printing LLVM IR using the new pass
infrastructure, and commandline support for the new pass infrastructure.

llvm-svn: 198688
2014-01-07 12:34:26 +00:00
NAKAMURA Takumi b5c4b87690 [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
Alp Toker f907b891da Correct word hyphenations
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities and contractions in nearby lines.

llvm-svn: 196471
2013-12-05 05:44:44 +00:00
Will Dietz ff1264b51a Export symbols in tools that support loading plugins.
llvm-svn: 196447
2013-12-05 01:01:58 +00:00
Juergen Ributzka 05c5a93283 [weak vtables] Place class definitions into anonymous namespaces to prevent weak vtables.
This patch places class definitions in implementation files into anonymous
namespaces to prevent weak vtables. This eliminates the need of providing an
out-of-line definition to pin the vtable explicitly to the file.

llvm-svn: 195092
2013-11-19 03:08:35 +00:00
Juergen Ributzka d12ccbd343 [weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file. The memory leaks in this version have been fixed. Thanks
Alexey for pointing them out.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

llvm-svn: 195064
2013-11-19 00:57:56 +00:00
Alexey Samsonov 49109a279c Revert r194865 and r194874.
This change is incorrect. If you delete virtual destructor of both a base class
and a subclass, then the following code:
  Base *foo = new Child();
  delete foo;
will not cause the destructor for members of Child class. As a result, I observe
plently of memory leaks. Notable examples I investigated are:
ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl.

llvm-svn: 194997
2013-11-18 09:31:53 +00:00
Juergen Ributzka dbedae89b9 [weak vtables] Remove a bunch of weak vtables
This patch removes most of the trivial cases of weak vtables by pinning them to
a single object file.

Differential Revision: http://llvm-reviews.chandlerc.com/D2068

Reviewed by Andy

llvm-svn: 194865
2013-11-15 22:34:48 +00:00
Andrew Trick b5e1e6cc11 Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."
Working on a better solution to this.

This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2.

llvm-svn: 190990
2013-09-19 06:02:43 +00:00
Andrew Trick f33d6df899 Encapsulate PassManager debug flags to avoid static init and cxa_exit.
This puts all the global PassManager debugging flags, like
-print-after-all and -time-passes, behind a managed static. This
eliminates their static initializers and, more importantly, exit-time
destructors.

The only behavioral change I anticipate is that tools need to
initialize the PassManager before parsing the command line in order to
export these options, which makes sense. Tools that already initialize
the standard passes (opt/llc) don't need to do anything new.

llvm-svn: 190974
2013-09-18 23:31:16 +00:00
Rafael Espindola 6d35481c94 Add a wrapper for open.
This centralizes the handling of O_BINARY and opens the way for hiding more
differences (like how open behaves with directories).

llvm-svn: 186447
2013-07-16 19:44:17 +00:00
Chandler Carruth 60d7006e99 Manually update the dependencies in the Makefiles. It turns out that all
that work on the LLVMBuild based dependency specification didn't
actually work, we just now maintain dependencies in *3* places instead
of 2. Yay.

There may still be some missing dependencies, I'm still sifting through
the bots and my builds, but this is a step in the right direction.

llvm-svn: 177988
2013-03-26 03:45:47 +00:00
Matt Arsenault bceea5dfea Fix auto_ptr is deprecated warnings
llvm-svn: 176123
2013-02-26 21:20:35 +00:00
Tim Northover 98d9b7e1d4 Fix missed out llvm-stress after APFloat change.
llvm-svn: 173141
2013-01-22 10:18:26 +00:00
Chandler Carruth 839a98e687 Move CallGraphSCCPass.h into the Analysis tree; that's where the
implementation lives already.

llvm-svn: 171746
2013-01-07 15:26:48 +00:00
Chandler Carruth 9fb823bbd4 Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366
2013-01-02 11:36:10 +00:00
Chandler Carruth 4d88a1c233 Sort the #include lines for tools/...
Again, tools are trickier to pick the main module header for than
library source files. I've started to follow the pattern of using
LLVMContext.h when it is included as a stub for program source files.

llvm-svn: 169252
2012-12-04 10:44:52 +00:00
Pedro Artigas d6b092bbd5 One more step towards making doInitialization and doFinalization useful for
start up and clean up module passes, now that ASAN and TSAN are fixed the
tests pass

llvm-svn: 168905
2012-11-29 17:47:05 +00:00
Owen Anderson 1db12f5135 Revert r168635 "Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model".
It appears to have broken at least one buildbot.

llvm-svn: 168654
2012-11-27 00:53:24 +00:00
Owen Anderson 336368c4fd Step towards implementation of pass manager with doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model
Patch by Pedro Artigas, with feedback from by Chandler Carruth.

llvm-svn: 168635
2012-11-26 23:54:47 +00:00
Owen Anderson 1aa2751260 Add doInitialization and doFinalization methods to ModulePass's, to allow them to be re-initialized and reused on multiple Module's.
Patch by Pedro Artigas.

llvm-svn: 168008
2012-11-15 00:14:15 +00:00
Andrew Trick becbbbe112 Silence -Wnon-virtual-dtor in llvm-stress.
This was making it hard to scan my builds for new warnings. The
warning still fires with ToT clang. But if my workaround is unnecessary
for whatever reason, feel free to revert.

llvm-svn: 164201
2012-09-19 05:08:30 +00:00
Nadav Rotem 0fb7408144 llvm-stress: Stabalize (by using an ordered container) and add randomness to the order in which loops are generated.
llvm-svn: 158908
2012-06-21 08:58:15 +00:00
Nadav Rotem aeacc17d50 Do not convert between fp128 <-> ppc_fp128 since there is no legal cast conversion between the two.
Patch by nobled <nobled@dreamwidth.org>

llvm-svn: 154772
2012-04-15 20:17:14 +00:00
Dylan Noblesmith 68f310df58 llvm-stress: stop abusing ConstantFP::get()
ConstantFP::get(Type*, double) is unreliably host-specific:
it can't handle a type like PPC128 on an x86 host. It even
has a comment to that effect: "This should only be used for
simple constant values like 2.0/1.0 etc, that are
known-valid both as host double and as the target format."

Instead, use APFloat. While we're at it, randomize the floating
point value more thoroughly; it was previously limited
to the range 0 to 2**19 - 1.

PR12451.

llvm-svn: 154446
2012-04-10 22:44:51 +00:00
Dylan Noblesmith 2a592dcc46 llvm-stress: don't make vectors of x86_mmx type
LangRef.html says:
"There are no arrays, vectors or constants of this type."

This was hitting assertions when passing the -generate-x86-mmx
option.

PR12452.

llvm-svn: 154445
2012-04-10 22:44:49 +00:00
Daniel Dunbar beb342539c Fix some stray semi-colons.
llvm-svn: 151680
2012-02-29 00:20:33 +00:00
Hal Finkel c947412fae Allow llvm-stress to optionally generate the other floating-point types (half, ppcf128, mmx, etc.)
llvm-svn: 151596
2012-02-27 23:59:33 +00:00
Nadav Rotem e4972ddea4 Add support for random constant vectors.
Patch by Joey Gouly.

llvm-svn: 151489
2012-02-26 13:56:18 +00:00
Nadav Rotem 115ec82ec7 Style fix: Remove unneeded parentheses.
llvm-svn: 151488
2012-02-26 12:34:17 +00:00
Nadav Rotem 63ff91d22a Fix a bug in the code that checks if a store value is a vector of i1s
llvm-svn: 151487
2012-02-26 12:00:22 +00:00
Nadav Rotem dc497b6c1c Fix compilation on MSVC. Rename "_BB" to "Block"
Thanks zygoloid.

llvm-svn: 151481
2012-02-26 08:59:25 +00:00
Nadav Rotem 089cf4211c fix a copy-and-paste error in the docs
llvm-svn: 151480
2012-02-26 08:43:43 +00:00
Nadav Rotem 78bda89412 Add a random .LL file generator to stress-test different llvm components.
llvm-svn: 151479
2012-02-26 08:35:53 +00:00