Skip to content

Commit 80301aa

Browse files
committed
clang-format changes
Adjust line length
1 parent ea49f29 commit 80301aa

File tree

4 files changed

+26
-31
lines changed

4 files changed

+26
-31
lines changed

llvm/include/llvm/CodeGen/ExpandFp.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ namespace llvm {
1515

1616
class TargetMachine;
1717

18-
class ExpandFpPass
19-
: public PassInfoMixin<ExpandFpPass> {
18+
class ExpandFpPass : public PassInfoMixin<ExpandFpPass> {
2019
private:
2120
const TargetMachine *TM;
2221

llvm/include/llvm/Passes/CodeGenPassBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
#include "llvm/CodeGen/DetectDeadLanes.h"
3030
#include "llvm/CodeGen/DwarfEHPrepare.h"
3131
#include "llvm/CodeGen/EarlyIfConversion.h"
32-
#include "llvm/CodeGen/ExpandLargeDivRem.h"
3332
#include "llvm/CodeGen/ExpandFp.h"
33+
#include "llvm/CodeGen/ExpandLargeDivRem.h"
3434
#include "llvm/CodeGen/ExpandMemCmp.h"
3535
#include "llvm/CodeGen/ExpandPostRAPseudos.h"
3636
#include "llvm/CodeGen/ExpandReductions.h"

llvm/lib/CodeGen/ExpandFp.cpp

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- ExpandFp.cpp - Expand fp instructions ----------------===//
1+
//===--- ExpandFp.cpp - Expand fp instructions ----------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -36,9 +36,9 @@ using namespace llvm;
3636

3737
static cl::opt<unsigned>
3838
ExpandFpConvertBits("expand-fp-convert-bits", cl::Hidden,
39-
cl::init(llvm::IntegerType::MAX_INT_BITS),
40-
cl::desc("fp convert instructions on integers with "
41-
"more than <N> bits are expanded."));
39+
cl::init(llvm::IntegerType::MAX_INT_BITS),
40+
cl::desc("fp convert instructions on integers with "
41+
"more than <N> bits are expanded."));
4242

4343
namespace {
4444
/// This class implements a precise expansion of the frem instruction.
@@ -435,8 +435,8 @@ static bool expandFRem(BinaryOperator &I) {
435435
/// br i1 %cmp6.not, label %if.end12, label %if.then8
436436
///
437437
/// if.then8: ; preds = %if.end
438-
/// %cond11 = select i1 %tobool.not, i64 9223372036854775807, i64 -9223372036854775808
439-
/// br label %cleanup
438+
/// %cond11 = select i1 %tobool.not, i64 9223372036854775807, i64
439+
/// -9223372036854775808 br label %cleanup
440440
///
441441
/// if.end12: ; preds = %if.end
442442
/// %cmp13 = icmp ult i64 %shr, 150
@@ -454,9 +454,10 @@ static bool expandFRem(BinaryOperator &I) {
454454
/// %mul19 = mul nsw i64 %shl, %conv
455455
/// br label %cleanup
456456
///
457-
/// cleanup: ; preds = %entry, %if.else, %if.then15, %if.then8
458-
/// %retval.0 = phi i64 [ %cond11, %if.then8 ], [ %mul, %if.then15 ], [ %mul19, %if.else ], [ 0, %entry ]
459-
/// ret i64 %retval.0
457+
/// cleanup: ; preds = %entry,
458+
/// %if.else, %if.then15, %if.then8
459+
/// %retval.0 = phi i64 [ %cond11, %if.then8 ], [ %mul, %if.then15 ], [
460+
/// %mul19, %if.else ], [ 0, %entry ] ret i64 %retval.0
460461
/// }
461462
///
462463
/// Replace fp to integer with generated code.
@@ -640,13 +641,11 @@ static void expandFPToI(Instruction *FPToI) {
640641
/// %or = or i64 %shr6, %conv11
641642
/// br label %sw.epilog
642643
///
643-
/// sw.epilog: ; preds = %sw.default, %if.then4, %sw.bb
644-
/// %a.addr.0 = phi i64 [ %or, %sw.default ], [ %sub, %if.then4 ], [ %shl, %sw.bb ]
645-
/// %1 = lshr i64 %a.addr.0, 2
646-
/// %2 = and i64 %1, 1
647-
/// %or16 = or i64 %2, %a.addr.0
648-
/// %inc = add nsw i64 %or16, 1
649-
/// %3 = and i64 %inc, 67108864
644+
/// sw.epilog: ; preds = %sw.default,
645+
/// %if.then4, %sw.bb
646+
/// %a.addr.0 = phi i64 [ %or, %sw.default ], [ %sub, %if.then4 ], [ %shl,
647+
/// %sw.bb ] %1 = lshr i64 %a.addr.0, 2 %2 = and i64 %1, 1 %or16 = or i64 %2,
648+
/// %a.addr.0 %inc = add nsw i64 %or16, 1 %3 = and i64 %inc, 67108864
650649
/// %tobool.not = icmp eq i64 %3, 0
651650
/// %spec.select.v = select i1 %tobool.not, i64 2, i64 3
652651
/// %spec.select = ashr i64 %inc, %spec.select.v
@@ -659,7 +658,8 @@ static void expandFPToI(Instruction *FPToI) {
659658
/// %shl25 = shl i64 %sub, %sh_prom24
660659
/// br label %if.end26
661660
///
662-
/// if.end26: ; preds = %sw.epilog, %if.else
661+
/// if.end26: ; preds = %sw.epilog,
662+
/// %if.else
663663
/// %a.addr.1 = phi i64 [ %shl25, %if.else ], [ %spec.select, %sw.epilog ]
664664
/// %e.0 = phi i32 [ %sub2, %if.else ], [ %spec.select56, %sw.epilog ]
665665
/// %conv27 = trunc i64 %shr to i32
@@ -673,7 +673,8 @@ static void expandFPToI(Instruction *FPToI) {
673673
/// %4 = bitcast i32 %or33 to float
674674
/// br label %return
675675
///
676-
/// return: ; preds = %entry, %if.end26
676+
/// return: ; preds = %entry,
677+
/// %if.end26
677678
/// %retval.0 = phi float [ %4, %if.end26 ], [ 0.000000e+00, %entry ]
678679
/// ret float %retval.0
679680
/// }
@@ -1052,8 +1053,7 @@ class ExpandFpLegacyPass : public FunctionPass {
10521053
static char ID;
10531054

10541055
ExpandFpLegacyPass() : FunctionPass(ID) {
1055-
initializeExpandFpLegacyPassPass(
1056-
*PassRegistry::getPassRegistry());
1056+
initializeExpandFpLegacyPassPass(*PassRegistry::getPassRegistry());
10571057
}
10581058

10591059
bool runOnFunction(Function &F) override {
@@ -1070,8 +1070,7 @@ class ExpandFpLegacyPass : public FunctionPass {
10701070
};
10711071
} // namespace
10721072

1073-
PreservedAnalyses ExpandFpPass::run(Function &F,
1074-
FunctionAnalysisManager &FAM) {
1073+
PreservedAnalyses ExpandFpPass::run(Function &F, FunctionAnalysisManager &FAM) {
10751074
const TargetSubtargetInfo *STI = TM->getSubtargetImpl(F);
10761075
return runImpl(F, *STI->getTargetLowering()) ? PreservedAnalyses::none()
10771076
: PreservedAnalyses::all();
@@ -1080,9 +1079,6 @@ PreservedAnalyses ExpandFpPass::run(Function &F,
10801079
char ExpandFpLegacyPass::ID = 0;
10811080
INITIALIZE_PASS_BEGIN(ExpandFpLegacyPass, "expand-fp",
10821081
"Expand certain fp instructions", false, false)
1083-
INITIALIZE_PASS_END(ExpandFpLegacyPass, "expand-fp",
1084-
"Expand fp", false, false)
1082+
INITIALIZE_PASS_END(ExpandFpLegacyPass, "expand-fp", "Expand fp", false, false)
10851083

1086-
FunctionPass *llvm::createExpandFpPass() {
1087-
return new ExpandFpLegacyPass();
1088-
}
1084+
FunctionPass *llvm::createExpandFpPass() { return new ExpandFpLegacyPass(); }

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@
8888
#include "llvm/CodeGen/DwarfEHPrepare.h"
8989
#include "llvm/CodeGen/EarlyIfConversion.h"
9090
#include "llvm/CodeGen/EdgeBundles.h"
91-
#include "llvm/CodeGen/ExpandLargeDivRem.h"
9291
#include "llvm/CodeGen/ExpandFp.h"
92+
#include "llvm/CodeGen/ExpandLargeDivRem.h"
9393
#include "llvm/CodeGen/ExpandMemCmp.h"
9494
#include "llvm/CodeGen/ExpandPostRAPseudos.h"
9595
#include "llvm/CodeGen/FinalizeISel.h"

0 commit comments

Comments
 (0)