- Jun 26, 2012
-
-
Jakob Stoklund Olesen authored
Such passes can be used to tweak the register assignments in a target-dependent way, for example to avoid write-after-write dependencies. llvm-svn: 159209
-
- Jun 25, 2012
-
-
Jakob Stoklund Olesen authored
Implicitly defined virtual registers can simply have the <undef> bit set on all uses, and copies can be turned into implicit defs recursively. Physical registers are a bit trickier. We handle the common case where a physreg def is used by a nearby instruction in the same basic block. For more complicated cases, just leave the IMPLICIT_DEF instruction in. llvm-svn: 159149
-
- Jun 09, 2012
-
-
Jakob Stoklund Olesen authored
OK, not really. We don't want to reintroduce the old rewriter hacks. This patch extracts virtual register rewriting as a separate pass that runs after the register allocator. This is possible now that CodeGen/Passes.cpp can configure the full optimizing register allocator pipeline. The rewriter pass uses register assignments in VirtRegMap to rewrite virtual registers to physical registers, and it inserts kill flags based on live intervals. These finalization steps are the same for the optimizing register allocators: RABasic, RAGreedy, and PBQP. llvm-svn: 158244
-
- May 30, 2012
-
-
rdar://problem/11498613Bob Wilson authored
Besides adding the new insertPass function, this patch uses it to enhance the existing -print-machineinstrs so that the MachineInstrs after a specific pass can be printed. Patch by Bin Zeng! llvm-svn: 157655
-
- May 01, 2012
-
-
Bill Wendling authored
The TargetPassManager's default constructor wants to initialize the PassManager to 'null'. But it's illegal to bind a null reference to a null l-value. Make the ivar a pointer instead. PR12468 llvm-svn: 155902
-
- Apr 16, 2012
-
-
Chandler Carruth authored
This is mostly to test the waters. I'd like to get results from FNT build bots and other bots running on non-x86 platforms. This feature has been pretty heavily tested over the last few months by me, and it fixes several of the execution time regressions caused by the inlining work by preventing inlining decisions from radically impacting block layout. I've seen very large improvements in yacr2 and ackermann benchmarks, along with the expected noise across all of the benchmark suite whenever code layout changes. I've analyzed all of the regressions and fixed them, or found them to be impossible to fix. See my email to llvmdev for more details. I'd like for this to be in 3.1 as it complements the inliner changes, but if any failures are showing up or anyone has concerns, it is just a flag flip and so can be easily turned off. I'm switching it on tonight to try and get at least one run through various folks' performance suites in case SPEC or something else has serious issues with it. I'll watch bots and revert if anything shows up. llvm-svn: 154816
-
- Mar 29, 2012
-
-
Jakob Stoklund Olesen authored
Some targets still mess up the liveness information, but that isn't verified after MRI->invalidateLiveness(). The verifier can still check other useful things like register classes and CFG, so it should be enabled after all passes. llvm-svn: 153615
-
Jakob Stoklund Olesen authored
The late scheduler depends on accurate liveness information if it is breaking anti-dependencies, so we should be able to verify it. Relax the terminator checking in the machine code verifier so it can handle the basic blocks created by if conversion. llvm-svn: 153614
-
- Mar 28, 2012
-
-
Jakob Stoklund Olesen authored
llvm-svn: 153599
-
Jakob Stoklund Olesen authored
Branch folding invalidates liveness and disables liveness verification on some targets. llvm-svn: 153597
-
- Mar 14, 2012
-
-
Andrew Trick authored
New flags: -misched-topdown, -misched-bottomup. They can be used with the default scheduler or with -misched=shuffle. Without either topdown/bottomup flag -misched=shuffle now alternates scheduling direction. LiveIntervals update is unimplemented with bottom-up scheduling, so only -misched-topdown currently works. Capped the ScheduleDAG hierarchy with a concrete ScheduleDAGMI class. ScheduleDAGMI is aware of the top and bottom of the unscheduled zone within the current region. Scheduling policy can be plugged into the ScheduleDAGMI driver by implementing MachineSchedStrategy. ConvergingScheduler is now the default scheduling algorithm. It exercises the new driver but still does no reordering. llvm-svn: 152700
-
- Feb 21, 2012
-
-
Evan Cheng authored
ecx = mov eax al = mov ch The second copy is not a nop because the sub-indices of ecx,ch is not the same of that of eax/al. Re-enabled machine-cp. PR11940 llvm-svn: 151002
-
- Feb 16, 2012
-
-
Benjamin Kramer authored
Disable machine copy propagation for now. It's known to be buggy (PR11940) and introduces subtle miscompiles in many places. llvm-svn: 150703
-
- Feb 15, 2012
-
-
Andrew Trick authored
I'll put MachineLICM back before PEI. All my arm/x86 benchmarks look good, but buildbots don't like it. llvm-svn: 150568
-
Andrew Trick authored
llvm-svn: 150567
-
Andrew Trick authored
llvm-svn: 150566
-
Andrew Trick authored
llvm-svn: 150565
-
Andrew Trick authored
The llc command line options for enabling/disabling passes are local to CodeGen/Passes.cpp. This patch associates those options with standard pass IDs so they work regardless of how the target configures the passes. A target has two ways of overriding standard passes: 1) Redefine the pass pipeline (override TargetPassConfig::add%Stage) 2) Replace or suppress individiual passes with TargetPassConfig::substitutePass. In both cases, the command line options associated with the pass override the target default. For example, say a target wants to disable machine instruction scheduling by default: - The target calls disablePass(MachineSchedulerID) but otherwise does not override any TargetPassConfig methods. - Without any llc options, no scheduler is run. - With -enable-misched, the standard machine scheduler is run and honors the -misched=... flag to select the scheduler variant, which may be used for performance evaluation or testing. Sorry overridePass is ugly. I haven't thought of a better way without replacing the cl::opt framework. I hope to do that one day... I haven't figured out why CodeGen uses char& for pass IDs. AnalysisID is much easier to use and less bug prone. I'm using it wherever I can for internal implementation. Maybe later we can change the global pass ID definitions as well. llvm-svn: 150563
-
Andrew Trick authored
Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes. llvm-svn: 150562
-
- Feb 11, 2012
-
-
Andrew Trick authored
In case the MachineScheduling pass I'm working on doesn't work well for another target, they can completely override it. This also adds a hook immediately after the RegAlloc pass to cleanup immediately after vregs go away. We may want to fold it into the postRA hook later. llvm-svn: 150298
-
- Feb 10, 2012
-
-
Andrew Trick authored
llvm-svn: 150233
-
Andrew Trick authored
Creates a configurable regalloc pipeline. Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa. When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>. CodeGen transformation passes are never "required" as an analysis ProcessImplicitDefs does not require LiveVariables. We have a plan to massively simplify some of the early passes within the regalloc superpass. llvm-svn: 150226
-
- Feb 09, 2012
-
-
Andrew Trick authored
Split CodeGen into stages. Distinguish between optimization and correctness. llvm-svn: 150122
-
- Feb 08, 2012
-
-
Andrew Trick authored
Moving toward a uniform style of pass definition to allow easier target configuration. Globally declare Pass ID. Globally declare pass initializer. Use INITIALIZE_PASS consistently. Add a call to the initializer from CodeGen.cpp. Remove redundant "createPass" functions and "getPassName" methods. While cleaning up declarations, cleaned up comments (sorry for large diff). llvm-svn: 150100
-
Andrew Trick authored
llvm-svn: 150099
-
Andrew Trick authored
llvm-svn: 150097
-
Andrew Trick authored
llvm-svn: 150096
-
Andrew Trick authored
llvm-svn: 150095
-
Andrew Trick authored
llvm-svn: 150093
-
Andrew Trick authored
llvm-svn: 150092
-
Andrew Trick authored
llvm-svn: 150091
-
- Feb 04, 2012
-
-
Andrew Trick authored
Passes prior to instructon selection are now split into separate configurable stages. Header dependencies are simplified. The bulk of this diff is simply removal of the silly DisableVerify flags. Sorry for the target header churn. Attempting to stabilize them. llvm-svn: 149754
-
Andrew Trick authored
llvm-svn: 149753
-
Andrew Trick authored
llvm-svn: 149752
-
- Nov 12, 2011
-
-
Jakob Stoklund Olesen authored
RegAllocGreedy has been the default for six months now. Deleting RegAllocLinearScan makes it possible to also delete VirtRegRewriter and clean up the spiller code. llvm-svn: 144475
-
- Apr 30, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 130582
-
Jakob Stoklund Olesen authored
llvm-svn: 130568
-
- Apr 19, 2011
-
-
Jakob Stoklund Olesen authored
This means that the new register allocator can be used with 'clang -mllvm -regalloc=greedy'. llvm-svn: 129764
-
- Jun 03, 2010
-
-
Jakob Stoklund Olesen authored
This affects both llvm-gcc and clang. llvm-svn: 105372
-
- May 28, 2010
-
-
Jakob Stoklund Olesen authored
optimization level. This only really affects llc for now because both the llvm-gcc and clang front ends override the default register allocator. I intend to remove that code later. llvm-svn: 104904
-