[llvm] r175739 - Code review cleanup for r175697
David Blaikie
dblaikie at gmail.com
Thu Feb 21 08:35:44 PST 2013
On Thu, Feb 21, 2013 at 6:35 AM, Bill Schmidt
<wschmidt at linux.vnet.ibm.com>wrote:
> Author: wschmidt
> Date: Thu Feb 21 08:35:42 2013
> New Revision: 175739
>
> URL: http://llvm.org/viewvc/llvm-project?rev=175739&view=rev
> Log:
> Code review cleanup for r175697
>
> Modified:
> llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=175739&r1=175738&r2=175739&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Feb 21 08:35:42
> 2013
> @@ -1524,20 +1524,16 @@ void PPCDAGToDAGISel::PostprocessISelDAG
> // If the relocation information isn't already present on the
> // immediate operand, add it now.
> if (ReplaceFlags) {
> - GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(ImmOpnd);
> -
> - if (GA) {
> + if (GlobalAddressSDNode *GA =
> dyn_cast<GlobalAddressSDNode>(ImmOpnd)) {
> DebugLoc dl = GA->getDebugLoc();
> const GlobalValue *GV = GA->getGlobal();
> ImmOpnd = CurDAG->getTargetGlobalAddress(GV, dl, MVT::i64, 0,
> Flags);
> - } else {
> - ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(ImmOpnd);
> - if (CP) {
> - const Constant *C = CP->getConstVal();
> - ImmOpnd = CurDAG->getTargetConstantPool(C, MVT::i64,
> - CP->getAlignment(),
> - 0, Flags);
> - }
> + }
> + else if (ConstantPoolSDNode *CP =
> dyn_cast<ConstantPoolSDNode>(ImmOpnd)) {
>
Still got a }\nelse here that's not usually the way we write it. Might I
suggest clang-format as a good place to start? It does wrap a few things
strangely (bugs welcome) but should get you in the ballpark pretty quickly.
> + const Constant *C = CP->getConstVal();
> + ImmOpnd = CurDAG->getTargetConstantPool(C, MVT::i64,
> + CP->getAlignment(),
> + 0, Flags);
> }
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130221/593af538/attachment.html>
More information about the llvm-commits
mailing list