[PATCH] D131572: [NFC][SeparateConstOffsetFromGEP] Small refactoring and reformatting
Elena Lepilkina via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 07:21:29 PDT 2022
eklepilkina updated this revision to Diff 451852.
eklepilkina added a comment.
- Removed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131572/new/
https://reviews.llvm.org/D131572
Files:
llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
Index: llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+++ llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
@@ -187,6 +187,7 @@
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
@@ -198,6 +199,8 @@
using namespace llvm;
using namespace llvm::PatternMatch;
+#define DEBUG_TYPE "separate-const-offset-from-gep"
+
static cl::opt<bool> DisableSeparateConstOffsetFromGEP(
"disable-separate-const-offset-from-gep", cl::init(false),
cl::desc("Do not separate the constant offset from a GEP instruction"),
@@ -254,15 +257,15 @@
/// successful, returns C and update UserChain as a def-use chain from C to V;
/// otherwise, UserChain is empty.
///
- /// \p V The given expression
- /// \p SignExtended Whether V will be sign-extended in the computation of the
- /// GEP index
- /// \p ZeroExtended Whether V will be zero-extended in the computation of the
- /// GEP index
- /// \p NonNegative Whether V is guaranteed to be non-negative. For example,
- /// an index of an inbounds GEP is guaranteed to be
- /// non-negative. Levaraging this, we can better split
- /// inbounds GEPs.
+ /// \p V The given expression
+ /// \p SignExtended Whether V will be sign-extended in the computation
+ /// of the GEP index
+ /// \p ZeroExtended Whether V will be zero-extended in the computation
+ /// of the GEP index
+ /// \p NonNegative Whether V is guaranteed to be non-negative. For
+ /// example, an index of an inbounds GEP is guaranteed
+ /// to be non-negative. Levaraging this, we can better
+ /// split inbounds GEPs.
APInt find(Value *V, bool SignExtended, bool ZeroExtended, bool NonNegative);
/// A helper function to look into both operands of a binary operator.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131572.451852.patch
Type: text/x-patch
Size: 2308 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220811/590130ea/attachment.bin>
More information about the llvm-commits
mailing list