[PATCH] Modularizing LICM

Nema, Ashutosh Ashutosh.Nema at amd.com
Tue Feb 17 01:26:09 PST 2015


Thanks Hal.
Sure I'll move ' LICMSafetyInfo' to a header file.
I'm planning to keep it in "LoopUtils.h".

Also can I move exposed functions(i.e. HoistRegion, SinkRegion, PromoteAliasSets & computeLICMSafetyInfo) 
and dependent routines to a separate file under utils i.e. "lib/Transforms/Utils/LICMCore.cpp" ?

Regards,
Ashutosh

-----Original Message-----
From: hfinkel at anl.gov [mailto:hfinkel at anl.gov] 
Sent: Tuesday, February 17, 2015 2:40 PM
To: Nema, Ashutosh; listmail at philipreames.com; bruno.cardoso at gmail.com; hfinkel at anl.gov
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Modularizing LICM

REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/LICM.cpp:75 @@ +74,3 @@
+namespace llvm {
+  struct LICMSafetyInfo
+  {
----------------
You need this definition in the header or else no other client will be able to create one of these.

================
Comment at: lib/Transforms/Scalar/LICM.cpp:76 @@ +75,3 @@
+  struct LICMSafetyInfo
+  {
+    bool MayThrow;           // The current loop contains an instruction which
----------------
Move { to the end of the previous line.

================
Comment at: lib/Transforms/Scalar/LICM.cpp:84 @@ +83,3 @@
+    {}
+  };
+}
----------------
Generically, we don't indent the contents of an anonymous namespace (this does not really matter here, because you need to move this struct to the header and not have it in an anonymous namespace).

http://reviews.llvm.org/D7291

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list