mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Python] Fix five classes of PEP-8 violations (E101/E111/E128/E302/W191)
* E101: indentation contains mixed spaces and tabs * E111: indentation is not a multiple of four * E128: continuation line under-indented for visual indent * E302: expected 2 blank lines, found 1 * W191: indentation contains tabs
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import pass_pipeline as ppipe
|
||||
import passes as p
|
||||
|
||||
|
||||
def diagnostic_passlist():
|
||||
return ppipe.PassList([
|
||||
p.CapturePromotion,
|
||||
@@ -16,6 +17,7 @@ def diagnostic_passlist():
|
||||
p.SplitNonCondBrCriticalEdges,
|
||||
])
|
||||
|
||||
|
||||
def simplifycfg_silcombine_passlist():
|
||||
return ppipe.PassList([
|
||||
p.SimplifyCFG,
|
||||
@@ -23,6 +25,7 @@ def simplifycfg_silcombine_passlist():
|
||||
p.SimplifyCFG,
|
||||
])
|
||||
|
||||
|
||||
def highlevel_loopopt_passlist():
|
||||
return ppipe.PassList([
|
||||
p.LowerAggregateInstrs,
|
||||
@@ -44,6 +47,7 @@ def highlevel_loopopt_passlist():
|
||||
p.SwiftArrayOpts,
|
||||
])
|
||||
|
||||
|
||||
def lowlevel_loopopt_passlist():
|
||||
return ppipe.PassList([
|
||||
p.LICM,
|
||||
@@ -53,6 +57,7 @@ def lowlevel_loopopt_passlist():
|
||||
p.SimplifyCFG,
|
||||
])
|
||||
|
||||
|
||||
def inliner_for_optlevel(optlevel):
|
||||
if optlevel == 'high':
|
||||
return p.EarlyInliner
|
||||
@@ -63,6 +68,7 @@ def inliner_for_optlevel(optlevel):
|
||||
else:
|
||||
raise RuntimeError('Unknown opt level')
|
||||
|
||||
|
||||
def ssapass_passlist(optlevel):
|
||||
return ppipe.PassList([
|
||||
simplifycfg_silcombine_passlist(),
|
||||
@@ -89,6 +95,7 @@ def ssapass_passlist(optlevel):
|
||||
p.GlobalARCOpts,
|
||||
])
|
||||
|
||||
|
||||
def lower_passlist():
|
||||
return ppipe.PassList([
|
||||
p.DeadFunctionElimination,
|
||||
@@ -100,6 +107,7 @@ def lower_passlist():
|
||||
p.FunctionSignatureOpts,
|
||||
])
|
||||
|
||||
|
||||
def normal_passpipelines():
|
||||
result = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user