Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
AsmPrinter/ | 03-May-2024 | - | 18,502 | 11,993 | ||
GlobalISel/ | 03-May-2024 | - | 2,032 | 1,371 | ||
MIRParser/ | 03-May-2024 | - | 3,832 | 3,180 | ||
SelectionDAG/ | 03-May-2024 | - | 69,472 | 49,249 | ||
AggressiveAntiDepBreaker.cpp | D | 03-May-2024 | 36.3 KiB | 999 | 673 | |
AggressiveAntiDepBreaker.h | D | 03-May-2024 | 6.7 KiB | 180 | 83 | |
AllocationOrder.cpp | D | 03-May-2024 | 1.9 KiB | 55 | 33 | |
AllocationOrder.h | D | 03-May-2024 | 2.8 KiB | 90 | 45 | |
Analysis.cpp | D | 03-May-2024 | 29.3 KiB | 732 | 448 | |
Android.bp | D | 03-May-2024 | 140 | 10 | 8 | |
AntiDepBreaker.h | D | 03-May-2024 | 2.5 KiB | 68 | 32 | |
AtomicExpandPass.cpp | D | 03-May-2024 | 64.3 KiB | 1,641 | 1,081 | |
BasicTargetTransformInfo.cpp | D | 03-May-2024 | 1.6 KiB | 39 | 16 | |
BranchFolding.cpp | D | 03-May-2024 | 71 KiB | 1,920 | 1,274 | |
BranchFolding.h | D | 03-May-2024 | 5.6 KiB | 161 | 129 | |
BuiltinGCs.cpp | D | 03-May-2024 | 5.1 KiB | 140 | 69 | |
CMakeLists.txt | D | 03-May-2024 | 3.5 KiB | 155 | 150 | |
CalcSpillWeights.cpp | D | 03-May-2024 | 7.8 KiB | 237 | 162 | |
CallingConvLower.cpp | D | 03-May-2024 | 10.3 KiB | 288 | 221 | |
CodeGen.cpp | D | 03-May-2024 | 3.8 KiB | 96 | 77 | |
CodeGenPrepare.cpp | D | 03-May-2024 | 209.5 KiB | 5,657 | 3,379 | |
CriticalAntiDepBreaker.cpp | D | 03-May-2024 | 27 KiB | 682 | 382 | |
CriticalAntiDepBreaker.h | D | 03-May-2024 | 4.1 KiB | 107 | 54 | |
DFAPacketizer.cpp | D | 03-May-2024 | 11.3 KiB | 326 | 198 | |
DeadMachineInstructionElim.cpp | D | 03-May-2024 | 6.4 KiB | 182 | 112 | |
DetectDeadLanes.cpp | D | 03-May-2024 | 20.8 KiB | 603 | 443 | |
DwarfEHPrepare.cpp | D | 03-May-2024 | 8.6 KiB | 265 | 185 | |
EarlyIfConversion.cpp | D | 03-May-2024 | 28.6 KiB | 818 | 520 | |
EdgeBundles.cpp | D | 03-May-2024 | 3 KiB | 98 | 66 | |
ExecutionDepsFix.cpp | D | 03-May-2024 | 26.3 KiB | 812 | 532 | |
ExpandISelPseudos.cpp | D | 03-May-2024 | 2.5 KiB | 75 | 46 | |
ExpandPostRAPseudos.cpp | D | 03-May-2024 | 7.1 KiB | 228 | 158 | |
FaultMaps.cpp | D | 03-May-2024 | 4.7 KiB | 151 | 102 | |
FuncletLayout.cpp | D | 03-May-2024 | 2 KiB | 60 | 38 | |
GCMetadata.cpp | D | 03-May-2024 | 5.2 KiB | 178 | 122 | |
GCMetadataPrinter.cpp | D | 03-May-2024 | 649 | 20 | 4 | |
GCRootLowering.cpp | D | 03-May-2024 | 12.1 KiB | 356 | 233 | |
GCStrategy.cpp | D | 03-May-2024 | 807 | 23 | 6 | |
GlobalMerge.cpp | D | 03-May-2024 | 22.1 KiB | 606 | 345 | |
IfConversion.cpp | D | 03-May-2024 | 67.6 KiB | 1,845 | 1,228 | |
ImplicitNullChecks.cpp | D | 03-May-2024 | 19.5 KiB | 577 | 316 | |
InlineSpiller.cpp | D | 03-May-2024 | 53.6 KiB | 1,457 | 985 | |
InterferenceCache.cpp | D | 03-May-2024 | 8.4 KiB | 251 | 189 | |
InterferenceCache.h | D | 03-May-2024 | 7 KiB | 239 | 121 | |
InterleavedAccessPass.cpp | D | 03-May-2024 | 12.8 KiB | 387 | 213 | |
IntrinsicLowering.cpp | D | 03-May-2024 | 22 KiB | 609 | 516 | |
LLVMBuild.txt | D | 03-May-2024 | 864 | 26 | 23 | |
LLVMTargetMachine.cpp | D | 03-May-2024 | 11.1 KiB | 312 | 206 | |
LatencyPriorityQueue.cpp | D | 03-May-2024 | 5.2 KiB | 141 | 78 | |
LexicalScopes.cpp | D | 03-May-2024 | 11.3 KiB | 333 | 240 | |
LiveDebugValues.cpp | D | 03-May-2024 | 18.5 KiB | 517 | 348 | |
LiveDebugVariables.cpp | D | 03-May-2024 | 35.8 KiB | 1,048 | 751 | |
LiveDebugVariables.h | D | 03-May-2024 | 2.5 KiB | 76 | 28 | |
LiveInterval.cpp | D | 03-May-2024 | 39.6 KiB | 1,251 | 823 | |
LiveIntervalAnalysis.cpp | D | 03-May-2024 | 58.2 KiB | 1,576 | 1,105 | |
LiveIntervalUnion.cpp | D | 03-May-2024 | 6.5 KiB | 206 | 130 | |
LivePhysRegs.cpp | D | 03-May-2024 | 6.1 KiB | 190 | 132 | |
LiveRangeCalc.cpp | D | 03-May-2024 | 16.7 KiB | 485 | 319 | |
LiveRangeCalc.h | D | 03-May-2024 | 10.1 KiB | 249 | 61 | |
LiveRangeEdit.cpp | D | 03-May-2024 | 15.7 KiB | 450 | 323 | |
LiveRangeUtils.h | D | 03-May-2024 | 2.1 KiB | 63 | 36 | |
LiveRegMatrix.cpp | D | 03-May-2024 | 6.6 KiB | 198 | 143 | |
LiveStackAnalysis.cpp | D | 03-May-2024 | 3 KiB | 89 | 59 | |
LiveVariables.cpp | D | 03-May-2024 | 29.1 KiB | 811 | 544 | |
LocalStackSlotAllocation.cpp | D | 03-May-2024 | 16.5 KiB | 421 | 267 | |
LowerEmuTLS.cpp | D | 03-May-2024 | 5.7 KiB | 163 | 113 | |
MIRPrinter.cpp | D | 03-May-2024 | 32.5 KiB | 1,006 | 887 | |
MIRPrinter.h | D | 03-May-2024 | 1 KiB | 34 | 10 | |
MIRPrintingPass.cpp | D | 03-May-2024 | 2 KiB | 72 | 41 | |
MachineBasicBlock.cpp | D | 03-May-2024 | 45 KiB | 1,290 | 905 | |
MachineBlockFrequencyInfo.cpp | D | 03-May-2024 | 6.9 KiB | 201 | 151 | |
MachineBlockPlacement.cpp | D | 03-May-2024 | 72.1 KiB | 1,776 | 1,034 | |
MachineBranchProbabilityInfo.cpp | D | 03-May-2024 | 3.2 KiB | 94 | 63 | |
MachineCSE.cpp | D | 03-May-2024 | 25.2 KiB | 717 | 508 | |
MachineCombiner.cpp | D | 03-May-2024 | 19.1 KiB | 478 | 312 | |
MachineCopyPropagation.cpp | D | 03-May-2024 | 12.5 KiB | 372 | 233 | |
MachineDominanceFrontier.cpp | D | 03-May-2024 | 1.7 KiB | 55 | 34 | |
MachineDominators.cpp | D | 03-May-2024 | 4.9 KiB | 158 | 95 | |
MachineFunction.cpp | D | 03-May-2024 | 36.4 KiB | 1,008 | 720 | |
MachineFunctionAnalysis.cpp | D | 03-May-2024 | 1.9 KiB | 61 | 39 | |
MachineFunctionPass.cpp | D | 03-May-2024 | 3.3 KiB | 90 | 59 | |
MachineFunctionPrinterPass.cpp | D | 03-May-2024 | 2.2 KiB | 70 | 39 | |
MachineInstr.cpp | D | 03-May-2024 | 75.7 KiB | 2,206 | 1,656 | |
MachineInstrBundle.cpp | D | 03-May-2024 | 10.8 KiB | 345 | 263 | |
MachineLICM.cpp | D | 03-May-2024 | 48.1 KiB | 1,389 | 904 | |
MachineLoopInfo.cpp | D | 03-May-2024 | 2.9 KiB | 85 | 59 | |
MachineModuleInfo.cpp | D | 03-May-2024 | 16 KiB | 464 | 303 | |
MachineModuleInfoImpls.cpp | D | 03-May-2024 | 1.5 KiB | 45 | 19 | |
MachinePassRegistry.cpp | D | 03-May-2024 | 1.7 KiB | 56 | 30 | |
MachinePipeliner.cpp | D | 03-May-2024 | 147.8 KiB | 3,944 | 2,906 | |
MachinePostDominators.cpp | D | 03-May-2024 | 1.7 KiB | 56 | 30 | |
MachineRegionInfo.cpp | D | 03-May-2024 | 4.1 KiB | 141 | 88 | |
MachineRegisterInfo.cpp | D | 03-May-2024 | 18 KiB | 530 | 377 | |
MachineSSAUpdater.cpp | D | 03-May-2024 | 12.8 KiB | 356 | 226 | |
MachineScheduler.cpp | D | 03-May-2024 | 128.2 KiB | 3,554 | 2,467 | |
MachineSink.cpp | D | 03-May-2024 | 31 KiB | 858 | 503 | |
MachineTraceMetrics.cpp | D | 03-May-2024 | 48.9 KiB | 1,329 | 950 | |
MachineVerifier.cpp | D | 03-May-2024 | 73.1 KiB | 2,050 | 1,619 | |
OptimizePHIs.cpp | D | 03-May-2024 | 6.3 KiB | 197 | 132 | |
PHIElimination.cpp | D | 03-May-2024 | 25.6 KiB | 653 | 415 | |
PHIEliminationUtils.cpp | D | 03-May-2024 | 2.2 KiB | 60 | 32 | |
PHIEliminationUtils.h | D | 03-May-2024 | 944 | 26 | 9 | |
ParallelCG.cpp | D | 03-May-2024 | 3.7 KiB | 100 | 65 | |
PatchableFunction.cpp | D | 03-May-2024 | 3 KiB | 89 | 60 | |
PeepholeOptimizer.cpp | D | 03-May-2024 | 73.8 KiB | 1,948 | 1,092 | |
PostRAHazardRecognizer.cpp | D | 03-May-2024 | 3.4 KiB | 99 | 50 | |
PostRASchedulerList.cpp | D | 03-May-2024 | 24.2 KiB | 706 | 449 | |
PreISelIntrinsicLowering.cpp | D | 03-May-2024 | 2.6 KiB | 95 | 65 | |
ProcessImplicitDefs.cpp | D | 03-May-2024 | 5.4 KiB | 169 | 119 | |
PrologEpilogInserter.cpp | D | 03-May-2024 | 46.8 KiB | 1,235 | 765 | |
PseudoSourceValue.cpp | D | 03-May-2024 | 4.3 KiB | 140 | 100 | |
README.txt | D | 03-May-2024 | 6.2 KiB | 200 | 149 | |
RegAllocBase.cpp | D | 03-May-2024 | 5.8 KiB | 162 | 109 | |
RegAllocBase.h | D | 03-May-2024 | 4.5 KiB | 123 | 41 | |
RegAllocBasic.cpp | D | 03-May-2024 | 10.3 KiB | 299 | 188 | |
RegAllocFast.cpp | D | 03-May-2024 | 41.5 KiB | 1,123 | 807 | |
RegAllocGreedy.cpp | D | 03-May-2024 | 97 KiB | 2,620 | 1,639 | |
RegAllocPBQP.cpp | D | 03-May-2024 | 31.4 KiB | 894 | 603 | |
RegUsageInfoCollector.cpp | D | 03-May-2024 | 4.9 KiB | 143 | 89 | |
RegUsageInfoPropagate.cpp | D | 03-May-2024 | 4.3 KiB | 132 | 88 | |
RegisterClassInfo.cpp | D | 03-May-2024 | 6.3 KiB | 182 | 119 | |
RegisterCoalescer.cpp | D | 03-May-2024 | 115.2 KiB | 3,059 | 1,905 | |
RegisterCoalescer.h | D | 03-May-2024 | 4.2 KiB | 117 | 40 | |
RegisterPressure.cpp | D | 03-May-2024 | 47.6 KiB | 1,351 | 1,029 | |
RegisterScavenging.cpp | D | 03-May-2024 | 14.5 KiB | 459 | 326 | |
RegisterUsageInfo.cpp | D | 03-May-2024 | 2.9 KiB | 93 | 58 | |
RenameIndependentSubregs.cpp | D | 03-May-2024 | 14 KiB | 389 | 270 | |
SafeStack.cpp | D | 03-May-2024 | 32.4 KiB | 852 | 585 | |
SafeStackColoring.cpp | D | 03-May-2024 | 9 KiB | 292 | 221 | |
SafeStackColoring.h | D | 03-May-2024 | 4.6 KiB | 150 | 88 | |
SafeStackLayout.cpp | D | 03-May-2024 | 4.7 KiB | 140 | 105 | |
SafeStackLayout.h | D | 03-May-2024 | 2.1 KiB | 69 | 37 | |
ScheduleDAG.cpp | D | 03-May-2024 | 19.9 KiB | 642 | 485 | |
ScheduleDAGInstrs.cpp | D | 03-May-2024 | 61.3 KiB | 1,712 | 1,136 | |
ScheduleDAGPrinter.cpp | D | 03-May-2024 | 3.2 KiB | 101 | 67 | |
ScoreboardHazardRecognizer.cpp | D | 03-May-2024 | 7.8 KiB | 241 | 159 | |
ShadowStackGCLowering.cpp | D | 03-May-2024 | 17.2 KiB | 469 | 287 | |
ShrinkWrap.cpp | D | 03-May-2024 | 20.2 KiB | 557 | 337 | |
SjLjEHPrepare.cpp | D | 03-May-2024 | 18.1 KiB | 481 | 322 | |
SlotIndexes.cpp | D | 03-May-2024 | 7.9 KiB | 246 | 160 | |
SpillPlacement.cpp | D | 03-May-2024 | 12.4 KiB | 376 | 226 | |
SpillPlacement.h | D | 03-May-2024 | 6.6 KiB | 171 | 64 | |
Spiller.h | D | 03-May-2024 | 1.2 KiB | 43 | 20 | |
SplitKit.cpp | D | 03-May-2024 | 53.9 KiB | 1,526 | 1,032 | |
SplitKit.h | D | 03-May-2024 | 20.4 KiB | 504 | 173 | |
StackColoring.cpp | D | 03-May-2024 | 40.9 KiB | 1,127 | 630 | |
StackMapLivenessAnalysis.cpp | D | 03-May-2024 | 6.2 KiB | 173 | 101 | |
StackMaps.cpp | D | 03-May-2024 | 18.8 KiB | 553 | 377 | |
StackProtector.cpp | D | 03-May-2024 | 17.7 KiB | 472 | 287 | |
StackSlotColoring.cpp | D | 03-May-2024 | 15.3 KiB | 470 | 333 | |
TailDuplication.cpp | D | 03-May-2024 | 1.9 KiB | 66 | 36 | |
TailDuplicator.cpp | D | 03-May-2024 | 33.5 KiB | 933 | 643 | |
TargetFrameLoweringImpl.cpp | D | 03-May-2024 | 4 KiB | 105 | 57 | |
TargetInstrInfo.cpp | D | 03-May-2024 | 44.2 KiB | 1,196 | 844 | |
TargetLoweringBase.cpp | D | 03-May-2024 | 72.7 KiB | 1,843 | 1,431 | |
TargetLoweringObjectFileImpl.cpp | D | 03-May-2024 | 37.4 KiB | 1,099 | 809 | |
TargetOptionsImpl.cpp | D | 03-May-2024 | 2 KiB | 50 | 21 | |
TargetPassConfig.cpp | D | 03-May-2024 | 33.6 KiB | 889 | 511 | |
TargetRegisterInfo.cpp | D | 03-May-2024 | 14.6 KiB | 400 | 279 | |
TargetSchedule.cpp | D | 03-May-2024 | 11.3 KiB | 301 | 207 | |
TwoAddressInstructionPass.cpp | D | 03-May-2024 | 64.3 KiB | 1,807 | 1,214 | |
UnreachableBlockElim.cpp | D | 03-May-2024 | 7.3 KiB | 221 | 153 | |
VirtRegMap.cpp | D | 03-May-2024 | 16.6 KiB | 468 | 330 | |
WinEHPrepare.cpp | D | 03-May-2024 | 49.1 KiB | 1,236 | 864 | |
XRayInstrumentation.cpp | D | 03-May-2024 | 3.5 KiB | 97 | 61 |
README.txt
1//===---------------------------------------------------------------------===// 2 3Common register allocation / spilling problem: 4 5 mul lr, r4, lr 6 str lr, [sp, #+52] 7 ldr lr, [r1, #+32] 8 sxth r3, r3 9 ldr r4, [sp, #+52] 10 mla r4, r3, lr, r4 11 12can be: 13 14 mul lr, r4, lr 15 mov r4, lr 16 str lr, [sp, #+52] 17 ldr lr, [r1, #+32] 18 sxth r3, r3 19 mla r4, r3, lr, r4 20 21and then "merge" mul and mov: 22 23 mul r4, r4, lr 24 str r4, [sp, #+52] 25 ldr lr, [r1, #+32] 26 sxth r3, r3 27 mla r4, r3, lr, r4 28 29It also increase the likelihood the store may become dead. 30 31//===---------------------------------------------------------------------===// 32 33bb27 ... 34 ... 35 %reg1037 = ADDri %reg1039, 1 36 %reg1038 = ADDrs %reg1032, %reg1039, %NOREG, 10 37 Successors according to CFG: 0x8b03bf0 (#5) 38 39bb76 (0x8b03bf0, LLVM BB @0x8b032d0, ID#5): 40 Predecessors according to CFG: 0x8b0c5f0 (#3) 0x8b0a7c0 (#4) 41 %reg1039 = PHI %reg1070, mbb<bb76.outer,0x8b0c5f0>, %reg1037, mbb<bb27,0x8b0a7c0> 42 43Note ADDri is not a two-address instruction. However, its result %reg1037 is an 44operand of the PHI node in bb76 and its operand %reg1039 is the result of the 45PHI node. We should treat it as a two-address code and make sure the ADDri is 46scheduled after any node that reads %reg1039. 47 48//===---------------------------------------------------------------------===// 49 50Use local info (i.e. register scavenger) to assign it a free register to allow 51reuse: 52 ldr r3, [sp, #+4] 53 add r3, r3, #3 54 ldr r2, [sp, #+8] 55 add r2, r2, #2 56 ldr r1, [sp, #+4] <== 57 add r1, r1, #1 58 ldr r0, [sp, #+4] 59 add r0, r0, #2 60 61//===---------------------------------------------------------------------===// 62 63LLVM aggressively lift CSE out of loop. Sometimes this can be negative side- 64effects: 65 66R1 = X + 4 67R2 = X + 7 68R3 = X + 15 69 70loop: 71load [i + R1] 72... 73load [i + R2] 74... 75load [i + R3] 76 77Suppose there is high register pressure, R1, R2, R3, can be spilled. We need 78to implement proper re-materialization to handle this: 79 80R1 = X + 4 81R2 = X + 7 82R3 = X + 15 83 84loop: 85R1 = X + 4 @ re-materialized 86load [i + R1] 87... 88R2 = X + 7 @ re-materialized 89load [i + R2] 90... 91R3 = X + 15 @ re-materialized 92load [i + R3] 93 94Furthermore, with re-association, we can enable sharing: 95 96R1 = X + 4 97R2 = X + 7 98R3 = X + 15 99 100loop: 101T = i + X 102load [T + 4] 103... 104load [T + 7] 105... 106load [T + 15] 107//===---------------------------------------------------------------------===// 108 109It's not always a good idea to choose rematerialization over spilling. If all 110the load / store instructions would be folded then spilling is cheaper because 111it won't require new live intervals / registers. See 2003-05-31-LongShifts for 112an example. 113 114//===---------------------------------------------------------------------===// 115 116With a copying garbage collector, derived pointers must not be retained across 117collector safe points; the collector could move the objects and invalidate the 118derived pointer. This is bad enough in the first place, but safe points can 119crop up unpredictably. Consider: 120 121 %array = load { i32, [0 x %obj] }** %array_addr 122 %nth_el = getelementptr { i32, [0 x %obj] }* %array, i32 0, i32 %n 123 %old = load %obj** %nth_el 124 %z = div i64 %x, %y 125 store %obj* %new, %obj** %nth_el 126 127If the i64 division is lowered to a libcall, then a safe point will (must) 128appear for the call site. If a collection occurs, %array and %nth_el no longer 129point into the correct object. 130 131The fix for this is to copy address calculations so that dependent pointers 132are never live across safe point boundaries. But the loads cannot be copied 133like this if there was an intervening store, so may be hard to get right. 134 135Only a concurrent mutator can trigger a collection at the libcall safe point. 136So single-threaded programs do not have this requirement, even with a copying 137collector. Still, LLVM optimizations would probably undo a front-end's careful 138work. 139 140//===---------------------------------------------------------------------===// 141 142The ocaml frametable structure supports liveness information. It would be good 143to support it. 144 145//===---------------------------------------------------------------------===// 146 147The FIXME in ComputeCommonTailLength in BranchFolding.cpp needs to be 148revisited. The check is there to work around a misuse of directives in inline 149assembly. 150 151//===---------------------------------------------------------------------===// 152 153It would be good to detect collector/target compatibility instead of silently 154doing the wrong thing. 155 156//===---------------------------------------------------------------------===// 157 158It would be really nice to be able to write patterns in .td files for copies, 159which would eliminate a bunch of explicit predicates on them (e.g. no side 160effects). Once this is in place, it would be even better to have tblgen 161synthesize the various copy insertion/inspection methods in TargetInstrInfo. 162 163//===---------------------------------------------------------------------===// 164 165Stack coloring improvements: 166 1671. Do proper LiveStackAnalysis on all stack objects including those which are 168 not spill slots. 1692. Reorder objects to fill in gaps between objects. 170 e.g. 4, 1, <gap>, 4, 1, 1, 1, <gap>, 4 => 4, 1, 1, 1, 1, 4, 4 171 172//===---------------------------------------------------------------------===// 173 174The scheduler should be able to sort nearby instructions by their address. For 175example, in an expanded memset sequence it's not uncommon to see code like this: 176 177 movl $0, 4(%rdi) 178 movl $0, 8(%rdi) 179 movl $0, 12(%rdi) 180 movl $0, 0(%rdi) 181 182Each of the stores is independent, and the scheduler is currently making an 183arbitrary decision about the order. 184 185//===---------------------------------------------------------------------===// 186 187Another opportunitiy in this code is that the $0 could be moved to a register: 188 189 movl $0, 4(%rdi) 190 movl $0, 8(%rdi) 191 movl $0, 12(%rdi) 192 movl $0, 0(%rdi) 193 194This would save substantial code size, especially for longer sequences like 195this. It would be easy to have a rule telling isel to avoid matching MOV32mi 196if the immediate has more than some fixed number of uses. It's more involved 197to teach the register allocator how to do late folding to recover from 198excessive register pressure. 199 200