1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

23 Commits

Author SHA1 Message Date
Craig Topper
58fa7a9b4a Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186274
2013-07-14 04:42:23 +00:00
Jakob Stoklund Olesen
203e10c066 Use MachineInstrBuilder in a few CodeGen passes.
This automatically passes a context pointer to MI->addOperand().

llvm-svn: 170711
2012-12-20 18:08:06 +00:00
Jakob Stoklund Olesen
eab040c93e Remove the explicit MachineInstrBuilder(MI) constructor.
Use the version that also takes an MF reference instead.

It would technically be possible to extract an MF reference from the MI
as MI->getParent()->getParent(), but that would not work for MIs that
are not inserted into any basic block.

Given the reasonably small number of places this constructor was used at
all, I preferred the compile time check to a run time assertion.

llvm-svn: 170588
2012-12-19 21:31:56 +00:00
Chandler Carruth
a490793037 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Richard Smith
2e1fc547c0 Fix undefined behavior: binding null pointer to reference. No functionality change.
llvm-svn: 161853
2012-08-14 05:31:26 +00:00
Chandler Carruth
5a4738503f Fix two rather subtle internal vs. external linker issues.
I'll admit I'm not entirely satisfied with this change, but it seemed
the cleanest option. Other suggestions quite welcome

The issue is that the traits specializations have static methods which
return the typedef'ed PHI_iterator type. In both the IR and MI layers
this is typedef'ed to a custom iterator class defined in an anonymous
namespace giving the types and the functions returning them internal
linkage. However, because the traits specialization is defined in the
'llvm' namespace (where it has to be, specialized template lives there),
and is in turn used in the templated implementation of the SSAUpdater.
This led to the linkage conflict that Clang now warns about.

The simplest solution to me was just to define the PHI_iterator as
a nested class inside the trait specialization. That way it still
doesn't get scoped widely, it can't be accidentally reused somewhere,
etc. This is a little gross just because nested class definitions are
a little gross, but the alternatives seem more ad-hoc.

llvm-svn: 158799
2012-06-20 08:39:30 +00:00
David Blaikie
06ecc99a56 More dead code removal (using -Wunreachable-code)
llvm-svn: 148578
2012-01-20 21:51:11 +00:00
Evan Cheng
91ae428cc0 Mix some minor misuse of MachineBasicBlock iterator.
llvm-svn: 145903
2011-12-06 02:49:06 +00:00
Bob Wilson
776d3dcfb4 Fix PR7096. When a block containing multiple defs is tail duplicated, the
SSAUpdater for the value from the first def may see uses of undefined values,
because the later defs will not have been updated yet.

llvm-svn: 103407
2010-05-10 17:14:26 +00:00
Bob Wilson
e81252b747 Combine the implementations of the core part of the SSAUpdater and
MachineSSAUpdater to avoid duplicating all the code.

llvm-svn: 103060
2010-05-04 23:18:19 +00:00
Bob Wilson
01b2bccb00 Update MachineSSAUpdater with the same changes I made for the IR-level
SSAUpdater.  I'm going to try to refactor this to share most of the code
between them.

llvm-svn: 102353
2010-04-26 17:40:49 +00:00
Chris Lattner
0da97990f6 stop using DebugLoc::getUnknownLoc()
llvm-svn: 100215
2010-04-02 20:17:23 +00:00
Chris Lattner
750bf54fc6 fix missing #includes.
llvm-svn: 95745
2010-02-10 01:17:36 +00:00
Chris Lattner
7acf9be6c4 move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.

llvm-svn: 95687
2010-02-09 19:54:29 +00:00
David Greene
020c436572 Change errs() to dbgs().
llvm-svn: 92548
2010-01-05 00:10:05 +00:00
Evan Cheng
58a787bc55 Watch out for duplicated PHI instructions.
llvm-svn: 90816
2009-12-07 23:11:03 +00:00
Evan Cheng
79d3b53208 Pre-regalloc tale duplication. Work in progress.
llvm-svn: 90759
2009-12-07 10:15:19 +00:00
Evan Cheng
2a99985e86 If BB is empty, insert PHI before end() instead of front().
llvm-svn: 90744
2009-12-07 03:07:01 +00:00
Evan Cheng
30aa0aa350 Don't try to be cute with undef optimization here. Let ProcessImplicitDefs handle it.
llvm-svn: 90566
2009-12-04 09:23:37 +00:00
Evan Cheng
0f151e89ab - If the reaching definition is an undef and the use is a PHI, add the implicit_def to the end of the source block.
- When reaching value is replaced with another, update the cache as well.

llvm-svn: 90501
2009-12-04 00:09:05 +00:00
Evan Cheng
73dcaa14fa Handle undef values properly.
llvm-svn: 90489
2009-12-03 21:51:55 +00:00
Evan Cheng
1c3edb4fa8 Fill out codegen SSA updater. It's not yet tested.
llvm-svn: 90395
2009-12-03 02:31:43 +00:00
Evan Cheng
e573096db2 Skeleton for MachineInstr level SSA updater.
llvm-svn: 90353
2009-12-02 22:02:52 +00:00